Skip to content
Snippets Groups Projects
Commit 190da728 authored by tjc's avatar tjc
Browse files

fix for Mac to autosave to wdir

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@5905 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 57120f02
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/DocumentEntryAutosaveThread.java,v 1.5 2006-08-09 16:35:31 tjc Exp $ * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/DocumentEntryAutosaveThread.java,v 1.6 2007-04-13 14:48:21 tjc Exp $
*/ */
package uk.ac.sanger.artemis.io; package uk.ac.sanger.artemis.io;
...@@ -33,7 +33,7 @@ import java.io.*; ...@@ -33,7 +33,7 @@ import java.io.*;
* called #entry_name# every 120 seconds. * called #entry_name# every 120 seconds.
* *
* @author Kim Rutherford <kmr@sanger.ac.uk> * @author Kim Rutherford <kmr@sanger.ac.uk>
* @version $Id: DocumentEntryAutosaveThread.java,v 1.5 2006-08-09 16:35:31 tjc Exp $ * @version $Id: DocumentEntryAutosaveThread.java,v 1.6 2007-04-13 14:48:21 tjc Exp $
**/ **/
public class DocumentEntryAutosaveThread extends Thread { public class DocumentEntryAutosaveThread extends Thread {
...@@ -77,7 +77,8 @@ public class DocumentEntryAutosaveThread extends Thread { ...@@ -77,7 +77,8 @@ public class DocumentEntryAutosaveThread extends Thread {
final File save_file; final File save_file;
if(document_entry.getDocument() instanceof RemoteFileDocument) if(document_entry.getDocument() instanceof RemoteFileDocument ||
isMac())
save_file = new File(System.getProperty("user.dir")+ save_file = new File(System.getProperty("user.dir")+
System.getProperty("file.separator")+ System.getProperty("file.separator")+
"#" + entry_name + "#"); "#" + entry_name + "#");
...@@ -114,7 +115,8 @@ public class DocumentEntryAutosaveThread extends Thread { ...@@ -114,7 +115,8 @@ public class DocumentEntryAutosaveThread extends Thread {
// auto save file isn't needed now so turn it into a backup file // auto save file isn't needed now so turn it into a backup file
final File new_name; final File new_name;
if(document_entry.getDocument() instanceof RemoteFileDocument) if(document_entry.getDocument() instanceof RemoteFileDocument ||
isMac())
new_name = new File (System.getProperty("user.dir")+ new_name = new File (System.getProperty("user.dir")+
System.getProperty("file.separator")+ System.getProperty("file.separator")+
entry_name + "~"); entry_name + "~");
...@@ -136,6 +138,11 @@ public class DocumentEntryAutosaveThread extends Thread { ...@@ -136,6 +138,11 @@ public class DocumentEntryAutosaveThread extends Thread {
} }
} }
private boolean isMac()
{
return System.getProperty("mrj.version") != null;
}
/** /**
* The DocumentEntry we will save. * The DocumentEntry we will save.
**/ **/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment