Fixes crash when importing non-existent games

This commit is contained in:
Riley Testut 2016-12-11 21:49:08 -08:00
parent 73af189100
commit 509a1af74c

View File

@ -167,6 +167,8 @@ extension DatabaseManager
for url in urls
{
guard FileManager.default.fileExists(atPath: url.path) else { continue }
let identifier = FileHash.sha1HashOfFile(atPath: url.path) as String
let filename = identifier + "." + url.pathExtension