Skip to content

[Windows] Add trailing slash to NSTemporaryDirectory result #2910

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 1 commit into from
Oct 25, 2020

Conversation

lxbndr
Copy link
Contributor

@lxbndr lxbndr commented Oct 24, 2020

NSTemporaryDirectory on Darwin returns path with trailing slash, and almost every test in TestFileManager counts on it.

Without slash tests are generating temporary paths like C:\Users\user\AppData\Temptest_isReadableFile5004BFCF-4356-4000-8000-000000000000, which is, obviously, out of Temp directory.

Non-Darwin and non-Windows platforms have already implemented similar workaround, so I just adapted existing solution for Windows.

NSTemporaryDirectory on Darwin returns path with trailing slash,
and almost every test in TestFileManager counts on it.
@lxbndr
Copy link
Contributor Author

lxbndr commented Oct 24, 2020

CC @compnerd

@compnerd
Copy link
Member

@swift-ci please test

@compnerd compnerd merged commit 7ff51ef into swiftlang:main Oct 25, 2020
@lxbndr lxbndr deleted the temporary-slash branch October 25, 2020 14:57
lxbndr added a commit to readdle/swift-corelibs-foundation that referenced this pull request Nov 9, 2020
Broken since swiftlang#2910. `validPathSeps` is internal to SwiftFoundation
and can't be accessed from Compatibility tests.
I think it is ok to define expected values in local scope of test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants