diff options
author | Moonchild <moonchild@palemoon.org> | 2022-05-09 22:38:16 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-05-09 22:38:16 +0000 |
commit | 9edf1b7bea5ff893f88911fc1a6a2dca3faeece9 (patch) | |
tree | 98bd9b0c7e3ca3e517e9e43dea157707b13f6bdb /netwerk/cache/nsCacheService.cpp | |
parent | 930ddd693be251c86ee904dafbaef38234b692c0 (diff) | |
download | uxp-9edf1b7bea5ff893f88911fc1a6a2dca3faeece9.tar.gz |
Issue #1896 - Port GetNativePath changes from GRE.getnativepath-work
Diffstat (limited to 'netwerk/cache/nsCacheService.cpp')
-rw-r--r-- | netwerk/cache/nsCacheService.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp index 6c8e5f5b84..1e63615044 100644 --- a/netwerk/cache/nsCacheService.cpp +++ b/netwerk/cache/nsCacheService.cpp @@ -1739,7 +1739,11 @@ nsCacheService::CreateCustomOfflineDevice(nsIFile *aProfileDir, if (MOZ_LOG_TEST(gCacheLog, LogLevel::Info)) { nsAutoCString profilePath; +#ifdef XP_WIN + aProfileDir->GetPersistentDescriptor(profilePath); +#else aProfileDir->GetNativePath(profilePath); +#endif CACHE_LOG_INFO(("Creating custom offline device, %s, %d", profilePath.BeginReading(), aQuota)); } @@ -3093,7 +3097,11 @@ nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, return; nsAutoCString newPath; +#ifdef XP_WIN + rv = aNewCacheSubdir->GetPersistentDescriptor(newPath); +#else rv = aNewCacheSubdir->GetNativePath(newPath); +#endif if (NS_FAILED(rv)) return; @@ -3105,7 +3113,11 @@ nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, rv = aNewCacheDir->Create(nsIFile::DIRECTORY_TYPE, 0777); if (NS_SUCCEEDED(rv) || NS_ERROR_FILE_ALREADY_EXISTS == rv) { nsAutoCString oldPath; +#ifdef XP_WIN + rv = aOldCacheSubdir->GetPersistentDescriptor(oldPath); +#else rv = aOldCacheSubdir->GetNativePath(oldPath); +#endif if (NS_FAILED(rv)) return; if (rename(oldPath.get(), newPath.get()) == 0) |