Index: trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 509)
+++ trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 510)
@@ -161,14 +161,15 @@
 			e.printStackTrace();
 			JOptionPane.showMessageDialog(Main.parent, tr("An error occurred while saving.")+"\n"+e.getMessage());
-		}
-		try {
-			// if the file save failed, then the tempfile will not
-			// be deleted.  So, restore the backup if we made one.
-			if (tmpFile != null && tmpFile.exists()) {
-				copy(tmpFile, file);
-			}
-		} catch (IOException e) {
-			e.printStackTrace();
-			JOptionPane.showMessageDialog(Main.parent, tr("An error occurred while restoring backup file.")+"\n"+e.getMessage());
+
+			try {
+				// if the file save failed, then the tempfile will not
+				// be deleted.  So, restore the backup if we made one.
+				if (tmpFile != null && tmpFile.exists()) {
+					copy(tmpFile, file);
+				}
+			} catch (IOException e2) {
+				e2.printStackTrace();
+				JOptionPane.showMessageDialog(Main.parent, tr("An error occurred while restoring backup file.")+"\n"+e2.getMessage());
+			}
 		}
 	}
