Trying to create a directory in a file should return ENOTDIR not EPERM#23025
Merged
sbc100 merged 12 commits intoemscripten-core:mainfrom Dec 2, 2024
Merged
Trying to create a directory in a file should return ENOTDIR not EPERM#23025sbc100 merged 12 commits intoemscripten-core:mainfrom
sbc100 merged 12 commits intoemscripten-core:mainfrom
Conversation
In linux, `mkdir("some_file/dir")` returns `ENOTDIR` but Emscripten returns
`EPERM`. This fixes it.
sbc100
approved these changes
Nov 27, 2024
sbc100
reviewed
Nov 27, 2024
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)); | ||
| } |
sbc100
approved these changes
Nov 27, 2024
auto-merge was automatically disabled
November 28, 2024 12:01
Head branch was pushed to by a user without write access
Collaborator
Author
|
@sbc100 looks like |
Collaborator
Author
|
|
Collaborator
Author
Collaborator
This was referenced Dec 4, 2024
sbc100
reviewed
Dec 5, 2024
| def test_fs_emptyPath(self): | ||
| self.do_run_in_out_file_test('fs/test_emptyPath.c') | ||
|
|
||
| @also_with_noderawfs |
Collaborator
There was a problem hiding this comment.
Oh I forget to say we should me marking these as @Crossplatform so that they run on windows.
hedwigz
pushed a commit
to hedwigz/emscripten
that referenced
this pull request
Dec 18, 2024
emscripten-core#23025) In linux, `mkdir("some_file/dir")` returns `ENOTDIR` but Emscripten returns `EPERM`. This fixes it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In linux,
mkdir("some_file/dir")returnsENOTDIRbut Emscripten returnsEPERM. This fixes it.