Skip to content

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

Description

@yunluoxin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions