Skip to content

Commit

Permalink
Check if file exists to prevent falsely opening it
Browse files Browse the repository at this point in the history
---
 Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>

Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>
  • Loading branch information
pkriens committed Apr 25, 2024
1 parent 340266d commit adaf4f1
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -222,6 +222,11 @@ public IFileStore getStore(URI uri) {
logger.logError("Cannot locate filestore for the JAR file: " + fileuri, e);
return nullFileStore(Path.EMPTY);
}
IFileInfo fetchInfo = store.fetchInfo();
if (fetchInfo == null || !fetchInfo.exists()) {
logger.logInfo("File no longer exists: " + uri, null);
return nullFileStore(Path.EMPTY);
}

JarRootNode root = roots.compute(store, this::computeRootNode)
.get();
Expand Down

0 comments on commit adaf4f1

Please sign in to comment.