Change file protection level

This commit is contained in:
Justin Mazzocchi 2021-01-16 20:35:54 -08:00
parent a672e97441
commit bb8fb9652e
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C

View file

@ -19,7 +19,7 @@ extension FileManager {
if !fileExists(atPath: databaseDirectoryURL.path, isDirectory: &isDirectory) {
try createDirectory(at: databaseDirectoryURL,
withIntermediateDirectories: false,
attributes: [.protectionKey: FileProtectionType.complete])
attributes: [.protectionKey: FileProtectionType.completeUnlessOpen])
} else if !isDirectory.boolValue {
throw DatabaseDirectoryError.unexpectedFileExistsWithDBDirectoryName
}