Skip to content

Commit 7f3ac0c

Browse files
committed
Remove directory deleting throws.
#361 (comment)
1 parent 0dadefe commit 7f3ac0c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Scripts/DowloadPortalItemData.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,8 @@ for portalItem in portalItems {
254254

255255
let destinationURL = downloadDirectoryURL.appendingPathComponent(portalItem.identifier, isDirectory: true)
256256

257-
// Deletes the directory if it already exists.
258-
// This happens when the item is not in the plist and needs to be redownloaded.
259-
do {
260-
try FileManager.default.removeItem(at: destinationURL)
261-
print("note: Deleted directory: \(portalItem.identifier)")
262-
}
257+
// Deletes the directory when the item is not in the plist.
258+
try? FileManager.default.removeItem(at: destinationURL)
263259

264260
do {
265261
// Creates an enclosing directory with portal item ID as its name.

0 commit comments

Comments
 (0)