From 50e3d2d219aca23e03becd4ae36447925bd84f97 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Tue, 18 Aug 2026 17:11:07 +0200 Subject: [PATCH] Check if the translated path is still correct, and clear the entry in case it failed Fixes #2856 --- .../uri/file/MavenRepositoryURIResolver.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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;