Skip to content

Commit 0dadefe

Browse files
committed
Remove file exists check.
#361 (comment)
1 parent 9a5e2b7 commit 0dadefe

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

Scripts/DowloadPortalItemData.swift

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,9 @@ for portalItem in portalItems {
256256

257257
// Deletes the directory if it already exists.
258258
// This happens when the item is not in the plist and needs to be redownloaded.
259-
if FileManager.default.fileExists(atPath: destinationURL.path) {
260-
do {
261-
print("note: Deleting directory: \(portalItem.identifier)")
262-
try FileManager.default.removeItem(at: destinationURL)
263-
} catch {
264-
print("error: Error deleting downloaded directory: \(error.localizedDescription)")
265-
exit(1)
266-
}
259+
do {
260+
try FileManager.default.removeItem(at: destinationURL)
261+
print("note: Deleted directory: \(portalItem.identifier)")
267262
}
268263

269264
do {

0 commit comments

Comments
 (0)