catch FNFE GitHub issue #171

java-i2p-warning
Zlatin Balevsky 2022-09-11 14:39:45 +03:00
parent d49ef8b495
commit a8d9354bf8
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 5 additions and 1 deletions

View File

@ -413,7 +413,11 @@ class PersisterFolderService extends BasePersisterService {
File file = path.toFile()
if (!file.exists() || !file.isFile())
return null
InfoHash.fromHashList(file.bytes)
try {
return InfoHash.fromHashList(file.bytes)
} catch (FileNotFoundException strange) {
return null
}
}
private static final class HMACKey implements SecretKey {