diff options
author | acolyer <acolyer> | 2003-09-12 19:29:46 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2003-09-12 19:29:46 +0000 |
commit | 86be10e1c46dc6b3c57a5200da03dd7b77ffe12f (patch) | |
tree | f8c53dc70ba0f30d3786f5715a50130edfdba8e9 /util | |
parent | a76fbd2d4e1247d699ae9910ae5252d67b29b823 (diff) | |
download | aspectj-86be10e1c46dc6b3c57a5200da03dd7b77ffe12f.tar.gz aspectj-86be10e1c46dc6b3c57a5200da03dd7b77ffe12f.zip |
make canonical versions of files...
Diffstat (limited to 'util')
-rw-r--r-- | util/src/org/aspectj/util/ConfigParser.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/util/src/org/aspectj/util/ConfigParser.java b/util/src/org/aspectj/util/ConfigParser.java index 0c3ea1e2e..36ed31edc 100644 --- a/util/src/org/aspectj/util/ConfigParser.java +++ b/util/src/org/aspectj/util/ConfigParser.java @@ -205,11 +205,19 @@ public class ConfigParser { return makeFile(getCurrentDir(), name); } - protected File makeFile(File dir, String name) { + private File makeFile(File dir, String name) { name = name.replace('/', File.separatorChar); File ret = new File(name); - if (dir == null || ret.isAbsolute()) return ret; - return new File(dir, name); + if (dir != null && !ret.isAbsolute()) { + ret = new File(dir, name); + } + try { + ret = ret.getCanonicalFile(); + } catch (IOException ioEx) { + // proceed without canonicalization + // so nothing to do here + } + return ret; } |