Skip to content

Commit

Permalink
Fix double slashes in paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ninxsoft committed Oct 29, 2023
1 parent c5aea7e commit e02f03a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Mist/Helpers/TaskManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class TaskManager: ObservableObject {
private static func isoTasks(for installer: Installer, filename: String, destination destinationURL: URL, temporaryDirectory temporaryDirectoryURL: URL) -> [MistTask] {

let temporaryImageURL: URL = temporaryDirectoryURL.appendingPathComponent("\(installer.id).dmg")
let createInstallMediaURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/Resources/createinstallmedia")
let createInstallMediaURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/Resources/createinstallmedia")
let temporaryCDRURL: URL = temporaryDirectoryURL.appendingPathComponent("\(installer.id).cdr")
let isoURL: URL = destinationURL.appendingPathComponent(filename.stringWithSubstitutions(name: installer.name, version: installer.version, build: installer.build))

Expand All @@ -445,7 +445,7 @@ class TaskManager: ObservableObject {

// Workaround to make macOS Sierra 10.12 createinstallmedia work
if installer.version.hasPrefix("10.12") {
let infoPlistURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/Info.plist")
let infoPlistURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/Info.plist")
try PropertyListUpdater.update(infoPlistURL, key: "CFBundleShortVersionString", value: "12.6.03")
}

Expand Down Expand Up @@ -474,7 +474,7 @@ class TaskManager: ObservableObject {
}
]
} else {
let installESDURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/SharedSupport/InstallESD.dmg")
let installESDURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/SharedSupport/InstallESD.dmg")
return [
MistTask(type: .convert, description: "Installer Disk Image to ISO") {
try await ISOConverter.convert(installESDURL, destination: temporaryCDRURL)
Expand Down Expand Up @@ -528,14 +528,14 @@ class TaskManager: ObservableObject {
}

private static func bootableInstallerTasks(for installer: Installer, volume: InstallerVolume) -> [MistTask] {
let createInstallMediaURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/Resources/createinstallmedia")
let createInstallMediaURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/Resources/createinstallmedia")
let mountPointURL: URL = URL(fileURLWithPath: volume.path)
let tasks: [MistTask] = [
MistTask(type: .create, description: "Bootable Installer") {

// Workaround to make macOS Sierra 10.12 createinstallmedia work
if installer.version.hasPrefix("10.12") {
let infoPlistURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/Info.plist")
let infoPlistURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/Info.plist")
try PropertyListUpdater.update(infoPlistURL, key: "CFBundleShortVersionString", value: "12.6.03")
}

Expand Down
2 changes: 1 addition & 1 deletion Mist/Model/Installer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ struct Installer: Decodable, Hashable, Identifiable {
URL(fileURLWithPath: "/Volumes/\(id)")
}
var temporaryInstallerURL: URL {
temporaryDiskImageMountPointURL.appendingPathComponent("/Applications/Install \(name).app")
temporaryDiskImageMountPointURL.appendingPathComponent("Applications/Install \(name).app")
}
var temporaryISOMountPointURL: URL {
URL(fileURLWithPath: "/Volumes/Install \(name)")
Expand Down

0 comments on commit e02f03a

Please sign in to comment.