... |
... |
@@ -1213,16 +1213,24 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult, |
1213
|
1213
|
NS_ENSURE_SUCCESS(rv, rv);
|
1214
|
1214
|
|
1215
|
1215
|
#if defined(BASE_BROWSER_UPDATE)
|
1216
|
|
- nsCOMPtr<nsIFile> dataDir;
|
1217
|
1216
|
// For Base Browser and derivatives, we store update history, etc. within the
|
1218
|
1217
|
// UpdateInfo directory under the user data directory.
|
1219
|
1218
|
# if defined(ANDROID)
|
1220
|
1219
|
# error "The Base Browser updater is not supported on Android."
|
1221
|
|
-# else
|
|
1220
|
+# endif
|
|
1221
|
+ nsCOMPtr<nsIFile> dataDir;
|
1222
|
1222
|
rv = GetUserDataDirectoryHome(getter_AddRefs(dataDir), false);
|
1223
|
1223
|
NS_ENSURE_SUCCESS(rv, rv);
|
1224
|
1224
|
rv = dataDir->GetParent(getter_AddRefs(updRoot));
|
1225
|
1225
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
1226
|
+# if !defined(XP_MACOSX)
|
|
1227
|
+ // For Tor Browser, the profile directory is TorBrowser/Data/Browser.
|
|
1228
|
+ // Updates used to be in TorBrowser/updateInfo, so go up two directories.
|
|
1229
|
+ // If we switch to data directory outside also on Windows and on Linux, we
|
|
1230
|
+ // should remove this block.
|
|
1231
|
+ dataDir = updRoot;
|
|
1232
|
+ rv = dataDir->GetParent(getter_AddRefs(updRoot));
|
|
1233
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
1226
|
1234
|
# endif
|
1227
|
1235
|
rv = updRoot->AppendNative("UpdateInfo"_ns);
|
1228
|
1236
|
NS_ENSURE_SUCCESS(rv, rv);
|