From df835114cbbbcc389774c5714c3d288fa17af721 Mon Sep 17 00:00:00 2001 From: John Rommel Estropia Date: Sat, 10 Sep 2016 22:57:45 +0900 Subject: [PATCH] ignore errors when deleting wal files --- Sources/Setup/StorageInterfaces/ICloudStore.swift | 4 ++-- Sources/Setup/StorageInterfaces/LegacySQLiteStore.swift | 4 ++-- Sources/Setup/StorageInterfaces/SQLiteStore.swift | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/Setup/StorageInterfaces/ICloudStore.swift b/Sources/Setup/StorageInterfaces/ICloudStore.swift index 2aecdd4..c15c82b 100644 --- a/Sources/Setup/StorageInterfaces/ICloudStore.swift +++ b/Sources/Setup/StorageInterfaces/ICloudStore.swift @@ -433,8 +433,8 @@ public class ICloudStore: CloudStorage { let fileManager = NSFileManager.defaultManager() try fileManager.removeItemAtURL(cacheFileURL) - _ = try fileManager.removeItemAtPath("\(cacheFileURL.absoluteString)-wal") - _ = try fileManager.removeItemAtPath("\(cacheFileURL.absoluteString)-shm") + _ = try? fileManager.removeItemAtPath("\(cacheFileURL.absoluteString)-wal") + _ = try? fileManager.removeItemAtPath("\(cacheFileURL.absoluteString)-shm") return } try cs_autoreleasepool { diff --git a/Sources/Setup/StorageInterfaces/LegacySQLiteStore.swift b/Sources/Setup/StorageInterfaces/LegacySQLiteStore.swift index a7414e1..f4bdaf2 100644 --- a/Sources/Setup/StorageInterfaces/LegacySQLiteStore.swift +++ b/Sources/Setup/StorageInterfaces/LegacySQLiteStore.swift @@ -174,8 +174,8 @@ public final class LegacySQLiteStore: LocalStorage, DefaultInitializableStore { let fileManager = NSFileManager.defaultManager() try fileManager.removeItemAtURL(fileURL) - _ = try fileManager.removeItemAtPath("\(fileURL.absoluteString)-wal") - _ = try fileManager.removeItemAtPath("\(fileURL.absoluteString)-shm") + _ = try? fileManager.removeItemAtPath("\(fileURL.absoluteString)-wal") + _ = try? fileManager.removeItemAtPath("\(fileURL.absoluteString)-shm") return } try cs_autoreleasepool { diff --git a/Sources/Setup/StorageInterfaces/SQLiteStore.swift b/Sources/Setup/StorageInterfaces/SQLiteStore.swift index 4a1d1a9..a566a89 100644 --- a/Sources/Setup/StorageInterfaces/SQLiteStore.swift +++ b/Sources/Setup/StorageInterfaces/SQLiteStore.swift @@ -171,8 +171,8 @@ public final class SQLiteStore: LocalStorage, DefaultInitializableStore { let fileManager = NSFileManager.defaultManager() try fileManager.removeItemAtURL(fileURL) - _ = try fileManager.removeItemAtPath("\(fileURL.absoluteString)-wal") - _ = try fileManager.removeItemAtPath("\(fileURL.absoluteString)-shm") + _ = try? fileManager.removeItemAtPath("\(fileURL.absoluteString)-wal") + _ = try? fileManager.removeItemAtPath("\(fileURL.absoluteString)-shm") return } try cs_autoreleasepool {