mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 685236 - Stop using GetNativePath in PSM. r=keeler
GetPersistentDescriptor is good enough for logging purpose. MozReview-Commit-ID: DmyW4lT5rT7 --HG-- extra : source : 3d2894427488acc3f9825e6ec4297b35ccbd44f1 extra : intermediate-source : 584662fbeb69351ab4e96afe2ed332916696b130
This commit is contained in:
parent
526dc874b1
commit
7783cc27f6
@ -187,7 +187,7 @@ CertBlocklist::Init()
|
||||
return rv;
|
||||
}
|
||||
nsAutoCString path;
|
||||
rv = mBackingFile->GetNativePath(path);
|
||||
rv = mBackingFile->GetPersistentDescriptor(path);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "nsDirectoryServiceDefs.h"
|
||||
#include "nsICertOverrideService.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsILocalFileWin.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsIProperties.h"
|
||||
@ -1210,7 +1211,18 @@ GetNSS3Directory(nsCString& result)
|
||||
MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("couldn't get parent directory?"));
|
||||
return rv;
|
||||
}
|
||||
#ifdef XP_WIN
|
||||
// Native path will drop Unicode characters that cannot be mapped to system's
|
||||
// codepage, using short (canonical) path as workaround.
|
||||
nsCOMPtr<nsILocalFileWin> nss3DirectoryWin = do_QueryInterface(nss3Directory);
|
||||
if (NS_FAILED(rv)) {
|
||||
MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("couldn't get nsILocalFileWin"));
|
||||
return rv;
|
||||
}
|
||||
return nss3DirectoryWin->GetNativeCanonicalPath(result);
|
||||
#else
|
||||
return nss3Directory->GetNativePath(result);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Returns by reference the path to the desired directory, based on the current
|
||||
@ -1232,7 +1244,18 @@ GetDirectoryPath(const char* directoryKey, nsCString& result)
|
||||
("could not get '%s' from directory service", directoryKey));
|
||||
return rv;
|
||||
}
|
||||
#ifdef XP_WIN
|
||||
// Native path will drop Unicode characters that cannot be mapped to system's
|
||||
// codepage, using short (canonical) path as workaround.
|
||||
nsCOMPtr<nsILocalFileWin> directoryWin = do_QueryInterface(directory);
|
||||
if (NS_FAILED(rv)) {
|
||||
MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("couldn't get nsILocalFileWin"));
|
||||
return rv;
|
||||
}
|
||||
return directoryWin->GetNativeCanonicalPath(result);
|
||||
#else
|
||||
return directory->GetNativePath(result);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user