We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8756a5a commit 9fa3263Copy full SHA for 9fa3263
src/node_file.cc
@@ -1988,7 +1988,7 @@ static void ReadDir(const FunctionCallbackInfo<Value>& args) {
1988
ToNamespacedPath(env, &path);
1989
1990
#ifdef _WIN32
1991
- if (slashCheck) {
+ if (slashCheck && !path.ToStringView().ends_with("\\")) {
1992
size_t new_length = path.length() + 1;
1993
path.AllocateSufficientStorage(new_length + 1);
1994
path.SetLengthAndZeroTerminate(new_length);
0 commit comments