-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix case insensitive upload (#15245) #26369
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
Draft
AlexWalsh2
wants to merge
26
commits into
emscripten-core:main
Choose a base branch
from
AlexWalsh2:fix_case_insensitive_upload
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+75
−2
Draft
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
83790a7
Overwrite same-name CASE_INSENSITIVE files (#26327)
AlexWalsh2 11c9609
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 8303655
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 2841fba
Add Case Insensitive Overwrite Test (#15245)
AlexWalsh2 69b327c
Add test code
AlexWalsh2 9a4f36f
Add test for #26327
AlexWalsh2 1d1e6f0
Write improved test for #15245
AlexWalsh2 519a05d
Files with identical contents no longer overwrite
AlexWalsh2 ab1dd58
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 b95f524
Fix failing CI
AlexWalsh2 4ca1484
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 c7ae52d
Merge branch 'fix_case_insensitive_upload' of github.com:AlexWalsh2/e…
AlexWalsh2 dbafd47
Fix typos
AlexWalsh2 b7a4d21
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 97524da
Refactor tests and FS data comparison
AlexWalsh2 e95950f
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 399e6a9
Refactor overwrite test
AlexWalsh2 f22817a
Test crossplatform of tests
AlexWalsh2 7a8f50d
Refactor tests
AlexWalsh2 5185579
Merge branch 'main' into fix_case_insensitive_upload
AlexWalsh2 bb86f51
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 aa8aa1d
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 e33e8dd
Remove createDataFile changes
AlexWalsh2 fddd729
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 1d715f0
Upload renamed test
AlexWalsh2 22d44f8
Merge branch 'emscripten-core:main' into fix_case_insensitive_upload
AlexWalsh2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| FS.createDataFile('/', "file.txt", "foo"); | ||
| var errCode = 0; | ||
| try { | ||
| FS.createDataFile('/', "fILe.txt", "foo2"); | ||
| } | ||
| catch (e) | ||
| { | ||
| errCode = e.errno; | ||
| } | ||
| var fileContents = FS.readFile("/file.txt"); | ||
| out('file.txt: ' + fileContents); | ||
| var ret = FS.analyzePath('/file.txt'); | ||
| out('file.txt collison: ' + ret.object.name_next); | ||
| out('errorCode: ' + errCode); |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /* | ||
| * Copyright 2026 The Emscripten Authors. All rights reserved. | ||
| * Emscripten is available under two separate licenses, the MIT license and the | ||
| * University of Illinois/NCSA Open Source License. Both these licenses can be | ||
| * found in the LICENSE file. | ||
| */ | ||
|
|
||
| #include <assert.h> | ||
| #include <stdio.h> | ||
|
|
||
| #include <emscripten.h> | ||
|
|
||
| void loadScript() { | ||
| printf("load2"); | ||
| FILE* file = fopen("file1.txt", "r"); | ||
|
|
||
| if (!file) { | ||
| assert(false); | ||
| } | ||
|
|
||
| while (!feof(file)) { | ||
| char c = fgetc(file); | ||
| if (c != EOF) { | ||
| putchar(c); | ||
| } | ||
| } | ||
| fclose(file); | ||
| exit(0); | ||
| } | ||
|
|
||
| void scriptLoadFail() { | ||
| printf("failed to load data_files.js\n"); | ||
| assert(false); | ||
| } | ||
|
|
||
| int main() { | ||
| emscripten_async_load_script("data_files.js", loadScript, scriptLoadFail); | ||
| return 99; | ||
| } |
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
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
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.
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.
Is there some reason why its important to swallow this error here? Is it needed for this change?
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.
There is a case (see #26327) where this error is not caught, causing the old code to hang. Is there a better place to catch it?