summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-04-04 07:22:37 -0400
committerMatt A. Tobin <email@mattatobin.com>2018-04-04 07:22:37 -0400
commitabc1c7eb393e6b0aa5b17958ab13ef7b1fe827c9 (patch)
tree197bde95999ee2b9f63c252422e5ac2d18a34b70
parenta1065a8a4bf277a9d4558167ace727c19a95030b (diff)
downloadUXP-abc1c7eb393e6b0aa5b17958ab13ef7b1fe827c9.tar
UXP-abc1c7eb393e6b0aa5b17958ab13ef7b1fe827c9.tar.gz
UXP-abc1c7eb393e6b0aa5b17958ab13ef7b1fe827c9.tar.lz
UXP-abc1c7eb393e6b0aa5b17958ab13ef7b1fe827c9.tar.xz
UXP-abc1c7eb393e6b0aa5b17958ab13ef7b1fe827c9.zip
[PALEMOON] Remove the NS_APP_BOOKMARKS_50_FILE directory service key
-rw-r--r--application/palemoon/components/dirprovider/DirectoryProvider.cpp52
1 files changed, 1 insertions, 51 deletions
diff --git a/application/palemoon/components/dirprovider/DirectoryProvider.cpp b/application/palemoon/components/dirprovider/DirectoryProvider.cpp
index 4d3993b7f..85728b351 100644
--- a/application/palemoon/components/dirprovider/DirectoryProvider.cpp
+++ b/application/palemoon/components/dirprovider/DirectoryProvider.cpp
@@ -34,57 +34,7 @@ NS_IMPL_ISUPPORTS(DirectoryProvider,
NS_IMETHODIMP
DirectoryProvider::GetFile(const char *aKey, bool *aPersist, nsIFile* *aResult)
{
- nsresult rv;
-
- *aResult = nullptr;
-
- // NOTE: This function can be reentrant through the NS_GetSpecialDirectory
- // call, so be careful not to cause infinite recursion.
-
- nsCOMPtr<nsIFile> file;
-
- char const* leafName = nullptr;
-
- if (!strcmp(aKey, NS_APP_BOOKMARKS_50_FILE)) {
- leafName = "bookmarks.html";
-
- nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
- if (prefs) {
- nsCString path;
- rv = prefs->GetCharPref("browser.bookmarks.file", getter_Copies(path));
- if (NS_SUCCEEDED(rv)) {
- NS_NewNativeLocalFile(path, true, getter_AddRefs(file));
- }
- }
- }
- else {
- return NS_ERROR_FAILURE;
- }
-
- nsDependentCString leafstr(leafName);
-
- nsCOMPtr<nsIFile> parentDir;
- if (file) {
- rv = file->GetParent(getter_AddRefs(parentDir));
- if (NS_FAILED(rv))
- return rv;
- }
- else {
- rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(parentDir));
- if (NS_FAILED(rv))
- return rv;
-
- rv = parentDir->Clone(getter_AddRefs(file));
- if (NS_FAILED(rv))
- return rv;
-
- file->AppendNative(leafstr);
- }
-
- *aPersist = true;
- NS_ADDREF(*aResult = file);
-
- return NS_OK;
+ return NS_ERROR_FAILURE;
}
static void