File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1234,6 +1234,7 @@ int MKDirpSync(uv_loop_t* loop,
12341234 }
12351235 break ;
12361236 case UV_EACCES:
1237+ case UV_ENOTDIR:
12371238 case UV_EPERM: {
12381239 return err;
12391240 }
@@ -1309,6 +1310,7 @@ int MKDirpAsync(uv_loop_t* loop,
13091310 break ;
13101311 }
13111312 case UV_EACCES:
1313+ case UV_ENOTDIR:
13121314 case UV_EPERM: {
13131315 req_wrap->continuation_data ()->Done (err);
13141316 break ;
@@ -1351,7 +1353,6 @@ int MKDirpAsync(uv_loop_t* loop,
13511353 }
13521354 // verify that the path pointed to is actually a directory.
13531355 if (err == 0 && !S_ISDIR (req->statbuf .st_mode )) err = UV_EEXIST;
1354- uv_fs_req_cleanup (req);
13551356 req_wrap->continuation_data ()->Done (err);
13561357 }});
13571358 if (err < 0 ) req_wrap->continuation_data ()->Done (err);
Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ function nextdir() {
148148 message : / E N O T D I R : .* m k d i r / ,
149149 name : 'Error' ,
150150 syscall : 'mkdir' ,
151+ path : pathname // See: https://github.com/nodejs/node/issues/28015
151152 }
152153 ) ;
153154}
@@ -187,6 +188,11 @@ function nextdir() {
187188 assert . strictEqual ( err . code , 'ENOTDIR' ) ;
188189 assert . strictEqual ( err . syscall , 'mkdir' ) ;
189190 assert . strictEqual ( fs . existsSync ( pathname ) , false ) ;
191+ // See: https://github.com/nodejs/node/issues/28015
192+ // The path field varies slightly in Windows errors, vs., other platforms
193+ // see: https://github.com/libuv/libuv/issues/2661, for this reason we
194+ // use startsWith() rather than comparing to the full "pathname".
195+ assert ( err . path . startsWith ( filename ) ) ;
190196 } ) ) ;
191197}
192198
You can’t perform that action at this time.
0 commit comments