Ticket #12374: AutosaveExtension.patch

File AutosaveExtension.patch, 918 bytes (added by kolesar, 4 years ago)
  • src/org/openstreetmap/josm/data/AutosaveTask.java

    diff --git a/src/org/openstreetmap/josm/data/AutosaveTask.java b/src/org/openstreetmap/josm/data/AutosaveTask.java
    index e0fa1b7..08edf73 100644
    a b public class AutosaveTask extends TimerTask implements LayerChangeListener, List 
    158158        while (true) {
    159159            String filename = String.format("%1$s_%2$tY%2$tm%2$td_%2$tH%2$tM%2$tS%2$tL%3$s",
    160160                    layer.layerFileName, now, index == 0 ? "" : '_' + index);
    161             File result = new File(autosaveDir, filename+".osm");
     161            String extension = Main.pref.get("autosave.extension", "osm");
     162            File result = new File(autosaveDir, filename + "." + extension);
    162163            try {
    163164                if (result.createNewFile()) {
    164165                    File pidFile = new File(autosaveDir, filename+".pid");