Skip to content

Commit 15038ea

Browse files
dnicolsonJoeMatt
authored andcommitted
Apply code suggestion
1 parent 3e87fad commit 15038ea

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

PVLibrary/Sources/PVLibrary/Database/Realm Database/RomDatabase.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ public final class RealmConfiguration {
4040
guard !PVAppGroupId.isEmpty, let container = RealmConfiguration.appGroupContainer else {
4141
return false
4242
}
43-
let path = container.path
4443
let fm = FileManager.default
45-
if fm.isReadableFile(atPath: path) {
46-
return true
47-
} else {
44+
var isDir: ObjCBool = false
45+
let path = container.path
46+
guard fm.fileExists(atPath: path, isDirectory: &isDir), isDir.boolValue else {
4847
return false
4948
}
49+
return true
5050
#endif
5151
}
5252

0 commit comments

Comments
 (0)