diff --git a/src/org/rascalmpl/uri/file/MavenRepositoryURIResolver.java b/src/org/rascalmpl/uri/file/MavenRepositoryURIResolver.java index b02efb220a0..c335b7c2a6f 100644 --- a/src/org/rascalmpl/uri/file/MavenRepositoryURIResolver.java +++ b/src/org/rascalmpl/uri/file/MavenRepositoryURIResolver.java @@ -169,9 +169,14 @@ private ISourceLocation calculateChildPath(String jarPath) { if (rootIsCaseSensitive && !reg.exists(result)) { // since we use the authority of an URI, and it's normalized to lower case // we can calculate the wrong-cased files path, so lets try and recover - var corrected = caseCorrectedPaths.get(jarPath, this::findDifferentCasedMatch); - if (corrected != null) { - return corrected; + ISourceLocation corrected; + while ((corrected = caseCorrectedPaths.get(jarPath, this::findDifferentCasedMatch)) != null) { + if (reg.exists(corrected)) { + return corrected; + } + // the file system changed, the file doesn't exist anymore + // so let's clear the entry and retry + caseCorrectedPaths.invalidate(jarPath); } } return result;