Skip to content

SR-12366: URL: standardizedFileURL inconsistent behavior on macOS and Linux #2808

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
Jun 4, 2020

Conversation

spevans
Copy link
Contributor

@spevans spevans commented May 31, 2020

  • When NSURL._resolvingSymlinksInPath() was creating a new URL(), it
    would use the default logic of checking if the file was a directory.
    Override this behaviour and use the .hasDirectoryPath property of the
    original NSURL when creating the resultant URL.

  • Modify NSURL.standardized to remove use of force-unwrap.

  • Add TestNSURL.swift for NSURL tests.

… Linux

- When NSURL._resolvingSymlinksInPath() was creating a new URL(), it
  would use the default logic of checking if the file was a directory.
  Override this behaviour and use the .hasDirectoryPath property of the
  original NSURL when creating the resultant URL.

- Modify NSURL.standardized to remove use of force-unwrap.

- Add TestNSURL.swift for NSURL tests.
@spevans
Copy link
Contributor Author

spevans commented May 31, 2020

@swift-ci test please

@spevans
Copy link
Contributor Author

spevans commented May 31, 2020

@swift-ci please test

@spevans
Copy link
Contributor Author

spevans commented Jun 1, 2020

@swift-ci test linux

@spevans
Copy link
Contributor Author

spevans commented Jun 3, 2020

@compnerd Could you please test this on windows? If dabbles with file paths so I just want to check it doesn't break anything, thanks.

@compnerd
Copy link
Member

compnerd commented Jun 3, 2020

@spevans
Copy link
Contributor Author

spevans commented Jun 4, 2020

@swift-ci please test and merge

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.

3 participants