Changeset 16768 in osm for applications/viewer/jmapviewer
- Timestamp:
- 2009-08-02T14:24:06+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmFileCacheTileLoader.java
r16392 r16768 56 56 super(map); 57 57 String tempDir = System.getProperty("java.io.tmpdir"); 58 String userName = System.getProperty("user.name"); 58 59 try { 59 60 if (cacheDir == null) { … … 61 62 throw new IOException("No temp directory set"); 62 63 } 63 cacheDir = new File(tempDir, "JMapViewerTiles"); 64 String subDirName = "JMapViewerTiles"; 65 // On Linux/Unix systems we do not have a per user tmp directory. 66 // Therefore we add the user name for getting a unique dir name. 67 if (userName != null && userName.length() > 0) 68 subDirName += "_" + userName; 69 cacheDir = new File(tempDir, subDirName); 64 70 } 65 71 log.finest("Tile cache directory: " + cacheDir); … … 72 78 } 73 79 } 74 80 75 81 /** 76 82 * Create a OSMFileCacheTileLoader with system property temp dir.
Note:
See TracChangeset
for help on using the changeset viewer.