Skip to content

Commit

Permalink
Fix crash related to unresolved relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Nooba committed Feb 18, 2021
1 parent 1746641 commit 8376e2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions XCAssetPacker/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ let fileManager = FileManager()
let sourceDirectoryURL: URL

if let input = inputPath {
sourceDirectoryURL = URL(fileURLWithPath: input)
sourceDirectoryURL = URL(fileURLWithPath: input).standardized
} else {
sourceDirectoryURL = URL(fileURLWithPath: fileManager.currentDirectoryPath)
}
Expand All @@ -93,7 +93,7 @@ if let input = inputPath {
var destinationDirectoryURL: URL

if let output = outputPath {
destinationDirectoryURL = URL(fileURLWithPath: output).absoluteURL
destinationDirectoryURL = URL(fileURLWithPath: output).standardized.absoluteURL
} else {
destinationDirectoryURL = URL(fileURLWithPath: fileManager.currentDirectoryPath)
}
Expand All @@ -103,7 +103,7 @@ if let output = outputPath {
var swiftDestinationURL: URL?

if let swiftDestinationPath = swiftDestinationOption.value {
swiftDestinationURL = URL(fileURLWithPath: swiftDestinationPath).absoluteURL
swiftDestinationURL = URL(fileURLWithPath: swiftDestinationPath).standardized.absoluteURL
} else if swiftDestinationOption.wasSet {
swiftDestinationURL = URL(fileURLWithPath: fileManager.currentDirectoryPath)
}
Expand Down

0 comments on commit 8376e2a

Please sign in to comment.