Changeset 7829 in josm


Ignore:
Timestamp:
2014-12-19T03:08:43+01:00 (4 years ago)
Author:
Don-vip
Message:

see #6248, #10026 - use recommended cache directories on Windows and OSX. Linux behaviour is unchanged

Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r7655 r7829  
    595595                cacheDirFile = new File(path);
    596596            } else {
    597                 cacheDirFile = new File(getPreferencesDirFile(), "cache");
     597                cacheDirFile = Main.platform.getDefaultCacheDirectory();
    598598            }
    599599        }
  • trunk/src/org/openstreetmap/josm/tools/PlatformHook.java

    r7343 r7829  
    120120    public boolean setupHttpsCertificate(String entryAlias, KeyStore.TrustedCertificateEntry trustedCert)
    121121            throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException;
     122
     123    /**
     124     * Returns the platform-dependent default cache directory.
     125     * @return the platform-dependent default cache directory
     126     * @since 7829
     127     */
     128    public File getDefaultCacheDirectory();
    122129}
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r7605 r7829  
    323323        return System.getProperty("os.name") + " " + System.getProperty("os.version");
    324324    }
     325
     326    @Override
     327    public File getDefaultCacheDirectory() {
     328        return new File(System.getProperty("user.home")+"/Library/Caches", "JOSM");
     329    }
    325330}
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r7349 r7829  
    370370        return false;
    371371    }
     372
     373    @Override
     374    public File getDefaultCacheDirectory() {
     375        return new File(Main.pref.getPreferencesDirFile(), "cache");
     376    }
    372377}
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r7497 r7829  
    283283        return true;
    284284    }
     285
     286    @Override
     287    public File getDefaultCacheDirectory() {
     288        return new File(System.getenv("LOCALAPPDATA")+"/JOSM", "cache");
     289    }
    285290}
Note: See TracChangeset for help on using the changeset viewer.