Index: trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 4370)
+++ trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 4371)
@@ -276,13 +276,5 @@
                     fileHistory.removeAll(failedAll);
                     int maxsize = Math.max(0, Main.pref.getInteger("file-open.history.max-size", 15));
-                    Collection<String> trimmedFileHistory = new ArrayList<String>(Math.min(maxsize, fileHistory.size()));
-                    int i = 0;
-                    for (String s : fileHistory) {
-                        if (++i > maxsize) {
-                            break;
-                        }
-                        trimmedFileHistory.add(s);
-                    }
-                    Main.pref.putCollection("file-open.history", trimmedFileHistory);
+                    Main.pref.putCollectionBounded("file-open.history", maxsize, fileHistory);
                 }
             }
Index: trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 4370)
+++ trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 4371)
@@ -7,5 +7,7 @@
 import java.io.File;
 import java.io.IOException;
-
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
 import javax.swing.JFileChooser;
 import javax.swing.JOptionPane;
@@ -23,4 +25,5 @@
 
 public abstract class SaveActionBase extends DiskAccessAction {
+    private File file;
 
     public SaveActionBase(String name, String iconName, String tooltip, Shortcut shortcut) {
@@ -28,8 +31,13 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
-        if (!isEnabled())
-            return;
-        doSave();
+        if (!isEnabled()) {
+            return;
+        }
+        boolean saved = doSave();
+        if (saved) {
+            addToFileOpenHistory();
+        }
     }
 
@@ -48,5 +56,6 @@
         if(!checkSaveConditions(layer))
             return false;
-        return doInternalSave(layer, getFile(layer));
+        file = getFile(layer);
+        return doInternalSave(layer, file);
     }
 
@@ -224,3 +233,18 @@
         return true;
     }
+
+    protected void addToFileOpenHistory() {
+        String filepath;
+        try {
+            filepath = file.getCanonicalPath();
+        } catch (IOException ign) {
+            return;
+        }
+
+        int maxsize = Math.max(0, Main.pref.getInteger("file-open.history.max-size", 15));
+        Collection<String> oldHistory = Main.pref.getCollection("file-open.history");
+        List<String> history = new LinkedList<String>(oldHistory);
+        history.add(0, filepath);
+        Main.pref.putCollectionBounded("file-open.history", maxsize, history);
+    }
 }
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 4370)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 4371)
@@ -741,4 +741,18 @@
     }
 
+    /**
+     * Saves at most {@code maxsize} items of collection {@code val}.
+     */
+    public boolean putCollectionBounded(String key, int maxsize, Collection<String> val) {
+        Collection<String> newCollection = new ArrayList<String>(maxsize);
+        for (String i : val) {
+            if (newCollection.size() >= maxsize) {
+                break;
+            }
+            newCollection.add(i);
+        }
+        return putCollection(key, newCollection);
+    }
+
     synchronized private void putCollectionDefault(String key, Collection<String> val) {
         putDefault(key, Utils.join("\u001e", val));
