Skip to content

Commit

Permalink
Update dump.swift
Browse files Browse the repository at this point in the history
print error
  • Loading branch information
paradiseduo authored Oct 14, 2024
1 parent 094b342 commit ba71eb2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/appdecrypt/dump.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,16 @@ class Dump {
}
#endif
do {
consoleIO.writeMessage("Copy From \(sourceUrl) to \(targetUrl)")
if fileManager.fileExists(atPath: targetUrl) {
// remove old files to ensure the integrity of the dump
try fileManager.removeItem(atPath: targetUrl)
consoleIO.writeMessage("Success to remove old files.")
consoleIO.writeMessage("Success to remove \(targetUrl)")
}
try fileManager.copyItem(atPath: sourceUrl, toPath: targetUrl)
consoleIO.writeMessage("Success to copy file.")
} catch {
consoleIO.writeMessage("Failed to copy file.", to: .error)
} catch let e {
consoleIO.writeMessage("Failed With \(e)", to: .error)
}

var needDumpFilePaths = [String]()
Expand Down

0 comments on commit ba71eb2

Please sign in to comment.