Changeset 3275 in osm for applications/editors/josm
- Timestamp:
- 2007-06-20T14:22:49+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java
r2936 r3275 44 44 DataSet dataset = layer.data; 45 45 46 File outFile = layer.associatedFile; 47 if(outFile == null) { 48 outFile = file; 46 // File outFile = layer.associatedFile; 47 // if(outFile == null) { 48 // outFile = file; 49 // } 50 51 // write to temporary file, on success, rename tmp file to target file: 52 File tmpFile = new File(file.getAbsoluteFile()+".tmp"); 53 System.out.println("AutoSaving osm data to file " + file.getAbsolutePath()); 54 synchronized(LiveGpsLock.class) { 55 XmlWriter.output(new FileOutputStream(tmpFile), new OsmWriter.All(dataset, false)); 49 56 } 50 System.out.println("AutoSaving osm data to file " + outFile.getAbsolutePath()); 51 synchronized(LiveGpsLock.class) { 52 XmlWriter.output(new FileOutputStream(outFile), new OsmWriter.All(dataset, false)); 53 } 57 tmpFile.renameTo(file); 54 58 System.out.println("AutoSaving finished"); 55 59 } catch (IOException x) {
Note:
See TracChangeset
for help on using the changeset viewer.