diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-10 13:27:20 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-14 11:59:58 +0200 |
commit | 5e7744ae006b41948359fe60841e8e66701fc5f9 (patch) | |
tree | fecb72b1730957c41b58e5bdb6d83d206ed265d6 /sonar-plugin-api | |
parent | 0d2a019b933e3a90de9c8365bfa4037b9d44d943 (diff) | |
download | sonarqube-5e7744ae006b41948359fe60841e8e66701fc5f9.tar.gz sonarqube-5e7744ae006b41948359fe60841e8e66701fc5f9.zip |
SONAR-5330 Fix issue when source dirs are symbolic links
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/PathResolver.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/PathResolver.java b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/PathResolver.java index 1dbaeaeca11..6da18e4a049 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/PathResolver.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/PathResolver.java @@ -26,6 +26,7 @@ import org.sonar.api.BatchComponent; import org.sonar.api.utils.PathUtils; import javax.annotation.CheckForNull; + import java.io.File; import java.util.Collection; import java.util.List; @@ -40,7 +41,7 @@ public class PathResolver implements BatchComponent { File file = new File(path); if (!file.isAbsolute()) { try { - file = new File(dir, path).getCanonicalFile(); + file = new File(dir, path).getAbsoluteFile(); } catch (Exception e) { throw new IllegalStateException("Fail to resolve path '" + path + "' relative to: " + dir.getAbsolutePath(), e); } |