Skip to content
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

It has problem when used in App(not SPM or Terminal) #85

Open
yunluoxin opened this issue Nov 24, 2022 · 0 comments
Open

It has problem when used in App(not SPM or Terminal) #85

yunluoxin opened this issue Nov 24, 2022 · 0 comments

Comments

@yunluoxin
Copy link

yunluoxin commented Nov 24, 2022

macOS Version: 12.5.1

Xcode: 14.0

Example (execute in macOS App):

        let p = Path("/Users/your-name/Desktops")
        let p2 = Path("~/Desktops")
        print(p ~= p2) // false

Reason:

  • When in macOS App, Apple use symbol link in sandbox to show Desktops / Documents / Downloads. When I print p2, I found it was /Users/your-name/xxx/your-App/Data/Desktops which is symbol link to real Desktops. And the ~= result is false.
  • When is Swift Package CLI, the result is true.
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

No branches or pull requests

1 participant