Skip to content

Commit

Permalink
Merge pull request #6100 from pkriens/issue/jarfilestore-exception-on…
Browse files Browse the repository at this point in the history
…-non-existing-file

Check if file exists to prevent falsely opening it
  • Loading branch information
pkriens committed Apr 26, 2024
2 parents b558126 + adaf4f1 commit 180a01a
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 180a01a

Please sign in to comment.