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 @@ -1278,6 +1278,7 @@ int MKDirpSync(uv_loop_t* loop,
1278
1278
}
1279
1279
break ;
1280
1280
case UV_EACCES:
1281
+ case UV_ENOTDIR:
1281
1282
case UV_EPERM: {
1282
1283
return err;
1283
1284
}
@@ -1356,6 +1357,7 @@ int MKDirpAsync(uv_loop_t* loop,
1356
1357
break ;
1357
1358
}
1358
1359
case UV_EACCES:
1360
+ case UV_ENOTDIR:
1359
1361
case UV_EPERM: {
1360
1362
req_wrap->continuation_data ()->Done (err);
1361
1363
break ;
@@ -1398,7 +1400,6 @@ int MKDirpAsync(uv_loop_t* loop,
1398
1400
}
1399
1401
// verify that the path pointed to is actually a directory.
1400
1402
if (err == 0 && !S_ISDIR (req->statbuf .st_mode )) err = UV_EEXIST;
1401
- uv_fs_req_cleanup (req);
1402
1403
req_wrap->continuation_data ()->Done (err);
1403
1404
}});
1404
1405
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() {
148
148
message : / E N O T D I R : .* m k d i r / ,
149
149
name : 'Error' ,
150
150
syscall : 'mkdir' ,
151
+ path : pathname // See: https://github.com/nodejs/node/issues/28015
151
152
}
152
153
) ;
153
154
}
@@ -187,6 +188,11 @@ function nextdir() {
187
188
assert . strictEqual ( err . code , 'ENOTDIR' ) ;
188
189
assert . strictEqual ( err . syscall , 'mkdir' ) ;
189
190
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 ) ) ;
190
196
} ) ) ;
191
197
}
192
198
You can’t perform that action at this time.
0 commit comments