diff --git a/admin/osx/mac-crafter/Sources/main.swift b/admin/osx/mac-crafter/Sources/main.swift index 8df694f67d..d4d49d389c 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -203,8 +203,12 @@ struct MacCrafter: ParsableCommand { let clientAppDir = "\(clientBuildDir)/image-\(buildType)-master/\(appName).app" try codesignClientAppBundle(at: clientAppDir, withCodeSignIdentity: codeSignIdentity) - print("Placing Nextcloud Desktop Client in product directory...") - try fm.createDirectory(atPath: productPath, withIntermediateDirectories: true, attributes: nil) + print("Placing Nextcloud Desktop Client in \(productPath)...") + if !fm.fileExists(atPath: productPath) { + try fm.createDirectory( + atPath: productPath, withIntermediateDirectories: true, attributes: nil + ) + } try fm.copyItem(atPath: clientAppDir, toPath: "\(productPath)/\(appName).app") print("Done!")