Lukhnos: Installer // Fix path bugs in ArchiveUtil.
Co-Authored-By: Lukhnos Liu <lukhnos@lukhnos.org>
This commit is contained in:
parent
1424d142db
commit
8341f6d983
|
@ -91,16 +91,16 @@ struct ArchiveUtil {
|
|||
unzipTask.waitUntilExit()
|
||||
|
||||
assert(unzipTask.terminationStatus == 0, "Must successfully unzipped")
|
||||
guard let result = (tempFilePath as NSString).appendingPathExtension(targetAppBundleName) else {
|
||||
return nil
|
||||
}
|
||||
assert(FileManager.default.fileExists(atPath: result), "App bundle must be unzipped at \(resourcePath).")
|
||||
let result = (tempFilePath as NSString).appendingPathComponent(targetAppBundleName)
|
||||
assert(FileManager.default.fileExists(atPath: result), "App bundle must be unzipped at \(result).")
|
||||
return result
|
||||
}
|
||||
|
||||
private var notarizedArchivesPath: String? {
|
||||
let resourePath = Bundle.main.resourcePath
|
||||
let notarizedArchivesPath = resourePath?.appending("NotarizedArchives")
|
||||
guard let resourePath = Bundle.main.resourcePath else {
|
||||
return nil
|
||||
}
|
||||
let notarizedArchivesPath = (resourePath as NSString).appendingPathComponent("NotarizedArchives")
|
||||
return notarizedArchivesPath
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ struct ArchiveUtil {
|
|||
return nil
|
||||
}
|
||||
let notarizedArchiveBasename = "\(appName)-r\(bundleVersion).zip"
|
||||
let notarizedArchive = notarizedArchivesPath.appending(notarizedArchiveBasename)
|
||||
let notarizedArchive = (notarizedArchivesPath as NSString).appendingPathComponent(notarizedArchiveBasename)
|
||||
return notarizedArchive
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue