🎁 Unwrap optional to get rid of string interpolation warning and force unwrap

This commit is contained in:
Ben Chatelain 2018-01-26 16:32:28 -07:00
parent e0239860f4
commit ceed994319

View file

@ -58,12 +58,13 @@ struct ResetCommand: CommandProtocol {
}
// Wipe Download Directory
let directory = CKDownloadDirectory(nil)
do {
try FileManager.default.removeItem(atPath: directory!)
} catch {
if options.debug {
printError("removeItemAtPath:\"\(directory)\" failed, \(error)")
if let directory = CKDownloadDirectory(nil) {
do {
try FileManager.default.removeItem(atPath: directory)
} catch {
if options.debug {
printError("removeItemAtPath:\"\(directory)\" failed, \(error)")
}
}
}