mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-19 16:40:38 -09:00
GP-1384: No longer relying on File.lastModified() == 0 to check for file
existence
This commit is contained in:
@@ -556,10 +556,10 @@ public class PackedDatabase extends Database {
|
||||
lock(packedDbLock, true, true);
|
||||
}
|
||||
try {
|
||||
long modTime = packedDbFile.lastModified();
|
||||
if (modTime == 0) {
|
||||
if (!packedDbFile.isFile()) {
|
||||
throw new FileNotFoundException("File not found: " + packedDbFile);
|
||||
}
|
||||
long modTime = packedDbFile.lastModified();
|
||||
if (isCached) {
|
||||
CachedDB entry = PackedDatabaseCache.getCache().getCachedDBEntry(packedDbFile);
|
||||
if (entry != null && entry.getLastModified() == modTime) {
|
||||
|
||||
@@ -216,8 +216,7 @@ public class PackedDatabaseCache {
|
||||
ItemDeserializer itemDeserializer = null;
|
||||
boolean success = false;
|
||||
try {
|
||||
long dbTime = packedDbFile.lastModified();
|
||||
if (dbTime == 0 || !packedDbFile.isFile()) {
|
||||
if (!packedDbFile.isFile()) {
|
||||
throw new FileNotFoundException("File not found: " + packedDbFile);
|
||||
}
|
||||
itemDeserializer = new ItemDeserializer(packedDbFile);
|
||||
|
||||
Reference in New Issue
Block a user