Emulate ENOTDIR better

This commit is contained in:
Justine Tunney 2023-08-16 20:11:19 -07:00
parent b76b2be2d0
commit 8d1c81ac9f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
35 changed files with 80 additions and 50 deletions

View file

@ -194,5 +194,10 @@ textwindows int __mkntpath2(const char *path,
n -= 4;
}
// turn "foo\\." into "foo\\"
if (n > 2 && path16[n - 1] == u'.' && path16[n - 2] == u'\\') {
path16[--n] = 0;
}
return n;
}