Changeset 7834 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2014-12-19T15:05:33+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r7805 r7834 880 880 } 881 881 } 882 // Try user- preferencedirectory883 String dir = Main.pref.getPreferencesDir() + "images";882 // Try user-data directory 883 String dir = new File(Main.pref.getUserDataDirectory(), "images").getAbsolutePath(); 884 884 try { 885 885 u = getImageUrl(dir, imageName, additionalClassLoaders); … … 952 952 }); 953 953 954 CachedFile cf = new CachedFile(base + fn).setDestDir(new File(Main.pref.getPreferencesDir(), "images").toString()); 954 CachedFile cf = new CachedFile(base + fn).setDestDir( 955 new File(Main.pref.getUserDataDirectory(), "images").getPath()); 955 956 try (InputStream is = cf.getInputStream()) { 956 957 parser.parse(new InputSource(is)); -
trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
r7831 r7834 134 134 */ 135 135 public File getDefaultPrefDirectory(); 136 137 /** 138 * Returns the platform-dependent default user data directory. 139 * @return the platform-dependent default user data directory 140 * @since 7834 141 */ 142 public File getDefaultUserDataDirectory(); 136 143 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r7831 r7834 333 333 return new File(System.getProperty("user.home")+"/Library/Preferences", "JOSM"); 334 334 } 335 336 @Override 337 public File getDefaultUserDataDirectory() { 338 return new File(System.getProperty("user.home")+"/Library/Application Support", "JOSM"); 339 } 335 340 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r7831 r7834 373 373 @Override 374 374 public File getDefaultCacheDirectory() { 375 return new File(Main.pref.get PreferencesDirFile(), "cache");375 return new File(Main.pref.getUserDataDirectory(), "cache"); 376 376 } 377 377 … … 380 380 return new File(System.getProperty("user.home"), ".josm"); 381 381 } 382 383 @Override 384 public File getDefaultUserDataDirectory() { 385 // Use preferences directory by default 386 return Main.pref.getPreferencesDirectory(); 387 } 382 388 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r7833 r7834 287 287 public File getDefaultCacheDirectory() { 288 288 String p = System.getenv("LOCALAPPDATA"); 289 if (p == null || "".equals(p)) { 289 if (p == null || p.isEmpty()) { 290 // Fallback for Windows OS earlier than Windows Vista, where the variable is not defined 290 291 p = System.getenv("APPDATA"); 291 292 }
Note:
See TracChangeset
for help on using the changeset viewer.