diff --git a/pmd/src/net/sourceforge/pmd/FileDataSource.java b/pmd/src/net/sourceforge/pmd/FileDataSource.java index 7510266644..59348c1e17 100644 --- a/pmd/src/net/sourceforge/pmd/FileDataSource.java +++ b/pmd/src/net/sourceforge/pmd/FileDataSource.java @@ -44,7 +44,11 @@ public class FileDataSource implements DataSource { } } - return file.getAbsolutePath(); + try { + return file.getCanonicalFile().getAbsolutePath(); + } catch (Exception e) { + return file.getAbsolutePath(); + } } private String trimAnyPathSep(String name) {