JAL-629 Add substituteHomeDir to getDirname(). Tighten dirname tests
[jalview.git] / src / jalview / util / FileUtils.java
index f5b3701..9b56c64 100644 (file)
@@ -164,7 +164,9 @@ public class FileUtils
     String dirname = null;
     try
     {
-      dirname = file.getParentFile().getCanonicalPath();
+      File p = file.getParentFile();
+      File d = new File(substituteHomeDir(p.getPath()));
+      dirname = d.getCanonicalPath();
     } catch (IOException e)
     {
       Console.debug(