mirror of
https://github.com/mssun/passforios.git
synced 2026-10-26 13:18:21 +01:00
Building the Core Data tree resolved every enumerated file URL, so a symbolic link ended up with the name and the path of its target. pass uses symbolic links to share one password between several entries, and those entries were all displayed -- and matched for autofill -- under the target's name. Take the name and the path from the link itself and only the type from the target, since isDirectoryKey does not follow links. Directories are now enumerated through their resolved URL so that symbolically linked directories are still traversed, under their own path. Paths are built from the parent entity instead of by slicing the resolved absolute path, which only worked because resolvingSymlinksInPath() also strips a leading /private. The resolved paths of the ancestors are carried along so that a link pointing back up the tree does not make the traversal loop forever. The traversal queue is now a Deque from swift-collections, which is added as a dependency and linked into passKit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>