-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Trying to create a directory in a file should return ENOTDIR not EPERM #23025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In linux, `mkdir("some_file/dir")` returns `ENOTDIR` but Emscripten returns `EPERM`. This fixes it.
test/fs/test_enotdir.c
Outdated
{ | ||
int target_fd = mkdir("file/blah", 0777); | ||
printf("target_fd: %d, errno: %d %s\n", target_fd, errno, strerror(errno)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2-space indentation.
Head branch was pushed to by a user without write access
@sbc100 looks like |
|
@@ -5832,6 +5832,10 @@ def test_fs_write(self): | |||
def test_fs_emptyPath(self): | |||
self.do_run_in_out_file_test('fs/test_emptyPath.c') | |||
|
|||
@also_with_noderawfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I forget to say we should me marking these as @Crossplatform so that they run on windows.
emscripten-core#23025) In linux, `mkdir("some_file/dir")` returns `ENOTDIR` but Emscripten returns `EPERM`. This fixes it.
In linux,
mkdir("some_file/dir")
returnsENOTDIR
but Emscripten returnsEPERM
. This fixes it.