Skip to content

Commit bcc79ec

Browse files
authored
Compare URLs with resolved symlinks
This fixes a base path mismatch when assets URLs are located in `/private/tmp`. See https://stackoverflow.com/questions/43031045/for-what-paths-is-resolvingsymlinksinpath-wrong
1 parent 62a6b01 commit bcc79ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/RswiftParsers/Resources/AssetCatalog+Parser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extension AssetCatalog: SupportedExtensions {
5353
var namespaces: [URL: NamespaceDirectory] = [URL(fileURLWithPath: ".", relativeTo: catalogURL): root]
5454

5555
for case let fileURL as URL in directoryEnumerator {
56-
guard fileURL.baseURL == catalogURL else {
56+
guard fileURL.baseURL?.resolvingSymlinksInPath() == catalogURL.resolvingSymlinksInPath() else {
5757
throw ResourceParsingError("File \(fileURL) is not in AssetCatalog \(catalogURL)")
5858
}
5959

0 commit comments

Comments
 (0)