summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Mozilla/cocoa
diff options
context:
space:
mode:
authorGrant Gayed <grant_gayed@ca.ibm.com>2012-03-26 12:43:46 -0400
committerGrant Gayed <grant_gayed@ca.ibm.com>2012-03-26 12:43:46 -0400
commitbaad710d04c31f3112d887cdf1d74d0dac488555 (patch)
treeaabb53e4ac6cb1c9b596630953ca3840dee0715a /bundles/org.eclipse.swt/Eclipse SWT Mozilla/cocoa
parent925a13ca36585501cfd4633effa1686ff264daa0 (diff)
downloadeclipse.platform.swt-baad710d04c31f3112d887cdf1d74d0dac488555.tar.gz
eclipse.platform.swt-baad710d04c31f3112d887cdf1d74d0dac488555.tar.xz
eclipse.platform.swt-baad710d04c31f3112d887cdf1d74d0dac488555.zip
Bug 367216 - XulRunner leaves cache files in Roaming Profile (OS X)
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Mozilla/cocoa')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/cocoa/org/eclipse/swt/browser/MozillaDelegate.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/cocoa/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/cocoa/org/eclipse/swt/browser/MozillaDelegate.java
index e891a89150..5d107a2cd4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/cocoa/org/eclipse/swt/browser/MozillaDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/cocoa/org/eclipse/swt/browser/MozillaDelegate.java
@@ -34,7 +34,14 @@ static Browser findBrowser (int /*long*/ handle) {
}
static String getCacheParentPath () {
- return getProfilePath ();
+ if (OS.VERSION >= 0x1060) {
+ NSArray array = NSFileManager.defaultManager ().URLsForDirectory (OS.NSCachesDirectory, OS.NSLocalDomainMask);
+ if (array.count () > 0) {
+ NSURL url = new NSURL (array.objectAtIndex (0));
+ return url.path ().getString () + Mozilla.SEPARATOR_OS + "eclipse"; //$NON-NLS-1$
+ }
+ }
+ return "/Library/Caches/eclipse"; //$NON-NLS-1$
}
static String getJSLibraryName () {