-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fix symLink's handling of /
path separators on Windows
#19136
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
Merged
Merged
Conversation
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
Symlink targets require canonicalized path separators on Windows
squeek502
commented
Mar 1, 2024
@@ -494,6 +491,6 @@ test "tar pipeToFileSystem" { | |||
try testing.expect((try root.dir.statFile("a/file")).kind == .file); | |||
// TODO is there better way to test symlink | |||
try testing.expect((try root.dir.statFile("b/symlink")).kind == .file); // statFile follows symlink | |||
var buf: [8]u8 = undefined; | |||
var buf: [32]u8 = undefined; |
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.
rootbeer
reviewed
Mar 1, 2024
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.
LGTM.
…ath separators Now, all the tests that use `testWithAllSupportedPathTypes` will also run each test with both `/` and `\` as the path separator on Windows. Also, removes the now-redundant "Dir.symLink with relative target that has a / path separator" since the same thing is now tested in the "Dir.readLink" test
8b049e5
to
f1dd1ee
Compare
Nice update to the tester, that should cover a lot more cases. |
ianic
added a commit
to ianic/zig
that referenced
this pull request
Mar 3, 2024
Fixing ci error: error: 'tar.test.test.pipeToFileSystem' failed: slices differ. first difference occurs at index 2 (0x2) ============ expected this output: ============= len: 9 (0x9) 2E 2E 2F 61 2F 66 69 6C 65 ../a/file ============= instead found this: ============== len: 9 (0x9) 2E 2E 5C 61 5C 66 69 6C 65 ..\a\file After ziglang#19136 dir.symlink changes path separtors to \ on windows.
ianic
added a commit
to ianic/zig
that referenced
this pull request
Mar 4, 2024
Fixing ci error: error: 'tar.test.test.pipeToFileSystem' failed: slices differ. first difference occurs at index 2 (0x2) ============ expected this output: ============= len: 9 (0x9) 2E 2E 2F 61 2F 66 69 6C 65 ../a/file ============= instead found this: ============== len: 9 (0x9) 2E 2E 5C 61 5C 66 69 6C 65 ..\a\file After ziglang#19136 dir.symlink changes path separtors to \ on windows.
ianic
added a commit
to ianic/zig
that referenced
this pull request
Mar 10, 2024
Fixing ci error: error: 'tar.test.test.pipeToFileSystem' failed: slices differ. first difference occurs at index 2 (0x2) ============ expected this output: ============= len: 9 (0x9) 2E 2E 2F 61 2F 66 69 6C 65 ../a/file ============= instead found this: ============== len: 9 (0x9) 2E 2E 5C 61 5C 66 69 6C 65 ..\a\file After ziglang#19136 dir.symlink changes path separtors to \ on windows.
ianic
added a commit
to ianic/zig
that referenced
this pull request
Mar 11, 2024
Fixing ci error: error: 'tar.test.test.pipeToFileSystem' failed: slices differ. first difference occurs at index 2 (0x2) ============ expected this output: ============= len: 9 (0x9) 2E 2E 2F 61 2F 66 69 6C 65 ../a/file ============= instead found this: ============== len: 9 (0x9) 2E 2E 5C 61 5C 66 69 6C 65 ..\a\file After ziglang#19136 dir.symlink changes path separtors to \ on windows.
RossComputerGuy
pushed a commit
to ExpidusOS-archive/zig
that referenced
this pull request
Mar 20, 2024
Fixing ci error: error: 'tar.test.test.pipeToFileSystem' failed: slices differ. first difference occurs at index 2 (0x2) ============ expected this output: ============= len: 9 (0x9) 2E 2E 2F 61 2F 66 69 6C 65 ../a/file ============= instead found this: ============== len: 9 (0x9) 2E 2E 5C 61 5C 66 69 6C 65 ..\a\file After ziglang#19136 dir.symlink changes path separtors to \ on windows.
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.
Follow up to #19126, fixes the Windows bug that was uncovered and re-enables the failing test.