JAL-3141 fix up merge artefact so BackupFilesTest passes
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 13 Mar 2019 10:50:39 +0000 (10:50 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 13 Mar 2019 10:50:39 +0000 (10:50 +0000)
src/jalview/gui/AlignFrame.java

index 011610c..a9d5b86 100644 (file)
@@ -1239,7 +1239,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
    */
   public void saveAlignment(String file, FileFormatI format)
   {
-    lastSaveSuccessful = false;
+    lastSaveSuccessful = true;
     lastFilenameSaved = file;
     lastFormatSaved = format;
 
@@ -1292,8 +1292,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
           BackupFiles backupfiles = new BackupFiles(file);
           try
           {
-            PrintWriter out = new PrintWriter(
-                    new FileWriter(backupfiles.getTempFilePath()));
+            String tempFilePath = backupfiles.getTempFilePath();
+                       PrintWriter out = new PrintWriter(
+                    new FileWriter(tempFilePath));
 
             out.print(output);
             out.close();