From 2ed4c9f470df51b8621edda4451ad1768c36c1d5 Mon Sep 17 00:00:00 2001 From: acolyer Date: Mon, 15 Mar 2004 15:11:16 +0000 Subject: move weaving to inside of the compiler.compile loop. ensure messages are associated with source wherever possible --- util/src/org/aspectj/util/FileUtil.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/src/org/aspectj/util/FileUtil.java b/util/src/org/aspectj/util/FileUtil.java index c7663ae63..34bf103a9 100644 --- a/util/src/org/aspectj/util/FileUtil.java +++ b/util/src/org/aspectj/util/FileUtil.java @@ -341,10 +341,14 @@ public class FileUtil { */ public static String getBestPath(File file) { LangUtil.throwIaxIfNull(file, "file"); - try { - return file.getCanonicalPath(); - } catch (IOException e) { - return file.getAbsolutePath(); + if (file.exists()) { + try { + return file.getCanonicalPath(); + } catch (IOException e) { + return file.getAbsolutePath(); + } + } else { + return file.getPath(); } } -- cgit v1.2.3