summaryrefslogtreecommitdiff
path: root/netwerk/cache2/CacheFileContextEvictor.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-05-09 22:38:16 +0000
committerMoonchild <moonchild@palemoon.org>2022-05-09 22:38:16 +0000
commit9edf1b7bea5ff893f88911fc1a6a2dca3faeece9 (patch)
tree98bd9b0c7e3ca3e517e9e43dea157707b13f6bdb /netwerk/cache2/CacheFileContextEvictor.cpp
parent930ddd693be251c86ee904dafbaef38234b692c0 (diff)
downloaduxp-9edf1b7bea5ff893f88911fc1a6a2dca3faeece9.tar.gz
Issue #1896 - Port GetNativePath changes from GRE.getnativepath-work
Diffstat (limited to 'netwerk/cache2/CacheFileContextEvictor.cpp')
-rw-r--r--netwerk/cache2/CacheFileContextEvictor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/netwerk/cache2/CacheFileContextEvictor.cpp b/netwerk/cache2/CacheFileContextEvictor.cpp
index 65feb44620..fd4e97550d 100644
--- a/netwerk/cache2/CacheFileContextEvictor.cpp
+++ b/netwerk/cache2/CacheFileContextEvictor.cpp
@@ -269,7 +269,11 @@ CacheFileContextEvictor::PersistEvictionInfoToDisk(
}
nsAutoCString path;
+#ifdef XP_WIN
+ file->GetPersistentDescriptor(path);
+#else
file->GetNativePath(path);
+#endif
PRFileDesc *fd;
rv = file->OpenNSPRFileDesc(PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE, 0600,
@@ -306,7 +310,11 @@ CacheFileContextEvictor::RemoveEvictInfoFromDisk(
}
nsAutoCString path;
+#ifdef XP_WIN
+ file->GetPersistentDescriptor(path);
+#else
file->GetNativePath(path);
+#endif
rv = file->Remove(false);
if (NS_WARN_IF(NS_FAILED(rv))) {