summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-02-03 17:11:21 +0000
committerMoonchild <moonchild@palemoon.org>2022-02-03 17:11:21 +0000
commit097fa969802f76530384926e8ef1f56777be3783 (patch)
tree8f01134d7c464a164707ce81a47d3a418eef0019 /components
parent56b8a05db34fabefad74e20876309263066b5bce (diff)
downloadaura-central-097fa969802f76530384926e8ef1f56777be3783.tar.gz
Issue %3057 - Part 9: Adjust all callsites for no longer using GetNativePath
Depending on context, various solutions were used.
Diffstat (limited to 'components')
-rw-r--r--components/commandlines/nsCommandLine.cpp4
-rw-r--r--components/profile/src/nsProfileLock.cpp8
-rw-r--r--components/rdf/src/nsFileSystemDataSource.cpp2
-rw-r--r--components/registry/src/nsChromeProtocolHandler.cpp3
4 files changed, 14 insertions, 3 deletions
diff --git a/components/commandlines/nsCommandLine.cpp b/components/commandlines/nsCommandLine.cpp
index 4f6257bef..07eccfc80 100644
--- a/components/commandlines/nsCommandLine.cpp
+++ b/components/commandlines/nsCommandLine.cpp
@@ -266,7 +266,11 @@ nsCommandLine::ResolveFile(const nsAString& aArgument, nsIFile* *aResult)
NS_CopyUnicodeToNative(aArgument, nativeArg);
nsAutoCString newpath;
+#ifdef XP_WIN
+ mWorkingDir->GetPersistentDescriptor(newpath);
+#else
mWorkingDir->GetNativePath(newpath);
+#endif
newpath.Append('/');
newpath.Append(nativeArg);
diff --git a/components/profile/src/nsProfileLock.cpp b/components/profile/src/nsProfileLock.cpp
index 654fbcd46..5b6fbe0dc 100644
--- a/components/profile/src/nsProfileLock.cpp
+++ b/components/profile/src/nsProfileLock.cpp
@@ -192,7 +192,11 @@ nsresult nsProfileLock::LockWithFcntl(nsIFile *aLockFile)
nsresult rv = NS_OK;
nsAutoCString lockFilePath;
+#ifdef XP_WIN
+ rv = aLockFile->GetPersistentDescriptor(lockFilePath);
+#else
rv = aLockFile->GetNativePath(lockFilePath);
+#endif
if (NS_FAILED(rv)) {
NS_ERROR("Could not get native path");
return rv;
@@ -298,7 +302,11 @@ nsresult nsProfileLock::LockWithSymlink(nsIFile *aLockFile, bool aHaveFcntlLock)
{
nsresult rv;
nsAutoCString lockFilePath;
+#ifdef XP_WIN
+ rv = aLockFile->GetPersistentDescriptor(lockFilePath);
+#else
rv = aLockFile->GetNativePath(lockFilePath);
+#endif
if (NS_FAILED(rv)) {
NS_ERROR("Could not get native path");
return rv;
diff --git a/components/rdf/src/nsFileSystemDataSource.cpp b/components/rdf/src/nsFileSystemDataSource.cpp
index 35632d1a3..c67656cd9 100644
--- a/components/rdf/src/nsFileSystemDataSource.cpp
+++ b/components/rdf/src/nsFileSystemDataSource.cpp
@@ -186,7 +186,7 @@ FileSystemDataSource::Init()
NS_NewFileURI(getter_AddRefs(furi), file);
NS_ENSURE_TRUE(furi, NS_ERROR_FAILURE);
- file->GetNativePath(ieFavoritesDir);
+ file->GetPersistentDescriptor(ieFavoritesDir);
}
#endif
diff --git a/components/registry/src/nsChromeProtocolHandler.cpp b/components/registry/src/nsChromeProtocolHandler.cpp
index f66c6d362..58a8cb7e3 100644
--- a/components/registry/src/nsChromeProtocolHandler.cpp
+++ b/components/registry/src/nsChromeProtocolHandler.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set ts=4 sw=4 sts=4 et cin: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -160,7 +159,7 @@ nsChromeProtocolHandler::NewChannel2(nsIURI* aURI,
file->Exists(&exists);
if (!exists) {
nsAutoCString path;
- file->GetNativePath(path);
+ file->GetPersistentDescriptor(path);
printf("Chrome file doesn't exist: %s\n", path.get());
}
}