Use system path separator char
authoramwaterhouse <Andrew Waterhouse>
Thu, 2 Nov 2006 15:10:37 +0000 (15:10 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 2 Nov 2006 15:10:37 +0000 (15:10 +0000)
src/jalview/bin/Cache.java

index 77178a1..0e9c3ca 100755 (executable)
@@ -95,7 +95,7 @@ public class Cache
         propertiesFile = propsFile;
         if (propsFile == null)
         {
-          propertiesFile = System.getProperty("user.home") + "/.jalview_properties";
+          propertiesFile = System.getProperty("user.home") +File.separatorChar+".jalview_properties";
         }
 
         try
@@ -288,12 +288,9 @@ public class Cache
     {
         try
         {
-            File oldFile = new File(propertiesFile);
-            oldFile.renameTo(new File(propertiesFile+"#"));
             FileOutputStream out = new FileOutputStream(propertiesFile);
             applicationProperties.store(out, "---JalviewX Properties File---");
             out.close();
-            oldFile.delete();
         }
         catch (Exception ex)
         {  System.out.println("Error saving properties: "+ex);  }