[tor-commits] [tor-browser/tor-browser-17.0.9esr-1] fixup! Change the default Firefox profile directory to be TBB-relative.
mikeperry at torproject.org
mikeperry at torproject.org
Fri Oct 18 00:40:54 UTC 2013
commit 0cfceec079329cfedff3baf9f681cfd5860b428d
Author: Kathy Brade <brade at pearlcrescent.com>
Date: Thu Oct 17 11:14:01 2013 -0400
fixup! Change the default Firefox profile directory to be TBB-relative.
Fix problem where profile was not found.
---
toolkit/xre/nsXREDirProvider.cpp | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index aae1e2f..b122f85 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -1295,16 +1295,15 @@ nsXREDirProvider::AppendProfilePath(nsIFile* aFile,
#if defined (XP_MACOSX)
if (!profile.IsEmpty()) {
rv = AppendProfileString(aFile, profile.get());
+ NS_ENSURE_SUCCESS(rv, rv);
}
- NS_ENSURE_SUCCESS(rv, rv);
#elif defined(XP_WIN) || defined(XP_OS2)
if (!profile.IsEmpty()) {
rv = AppendProfileString(aFile, profile.get());
+ NS_ENSURE_SUCCESS(rv, rv);
}
- NS_ENSURE_SUCCESS(rv, rv);
-
#elif defined(ANDROID)
// The directory used for storing profiles
// The parent of this directory is set in GetUserDataDirectoryHome
@@ -1315,9 +1314,6 @@ nsXREDirProvider::AppendProfilePath(nsIFile* aFile,
rv = aFile->AppendNative(nsDependentCString("mozilla"));
NS_ENSURE_SUCCESS(rv, rv);
#elif defined(XP_UNIX)
- // Make it hidden (i.e. using the ".")
- nsCAutoString folder(".");
-
if (!profile.IsEmpty()) {
// Skip any leading path characters
const char* profileStart = profile.get();
@@ -1329,17 +1325,14 @@ nsXREDirProvider::AppendProfilePath(nsIFile* aFile,
if (*profileStart == '.')
profileStart++;
+ // Make it hidden (i.e. using the ".")
+ nsCAutoString folder(".");
folder.Append(profileStart);
ToLowerCase(folder);
rv = AppendProfileString(aFile, folder.BeginReading());
+ NS_ENSURE_SUCCESS(rv, rv);
}
- else {
- ToLowerCase(folder);
-
- rv = aFile->AppendNative(folder);
- }
- NS_ENSURE_SUCCESS(rv, rv);
#else
#error "Don't know how to get profile path on your platform"
More information about the tor-commits
mailing list