public void saveState(File statefile)
{
FileOutputStream fos = null;
- // create backupfiles object and get new temp filename destination
- BackupFiles backupfiles = new BackupFiles(statefile);
try
{
- fos = new FileOutputStream(backupfiles.getTempFilePath());
+ fos = new FileOutputStream(statefile);
JarOutputStream jout = new JarOutputStream(fos);
saveState(jout);
fos.close();
- backupfiles.setWriteSuccess(true);
- backupfiles.rollBackupsAndRenameTempFile();
} catch (Exception e)
{
- Cache.log.error("Couln't write Jalview state to " + statefile
- + ". Temporary file is at: " + backupfiles.getTempFile(), e);
+ Cache.log.error("Couln't write Jalview state to " + statefile, e);
// TODO: inform user of the problem - they need to know if their data was
// not saved !
if (errorMessage == null)
else
{
errorMessage += "(Didn't write Jalview Archive to output file '"
- + statefile + "\nTemporary file is at: "
- + backupfiles.getTempFile() + ")";
+ + statefile + ")";
}
e.printStackTrace();
} finally