summaryrefslogtreecommitdiff
path: root/netwerk/base/nsDirectoryIndexStream.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/base/nsDirectoryIndexStream.cpp
parent930ddd693be251c86ee904dafbaef38234b692c0 (diff)
downloaduxp-getnativepath-work.tar.gz
Issue #1896 - Port GetNativePath changes from GRE.getnativepath-work
Diffstat (limited to 'netwerk/base/nsDirectoryIndexStream.cpp')
-rw-r--r--netwerk/base/nsDirectoryIndexStream.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/netwerk/base/nsDirectoryIndexStream.cpp b/netwerk/base/nsDirectoryIndexStream.cpp
index 87a57fd579..bfcc73475b 100644
--- a/netwerk/base/nsDirectoryIndexStream.cpp
+++ b/netwerk/base/nsDirectoryIndexStream.cpp
@@ -1,17 +1,13 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set 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/. */
-
/*
-
- The converts a filesystem directory into an "HTTP index" stream per
+ This converts a filesystem directory into an "HTTP index" stream per
Lou Montulli's original spec:
http://www.mozilla.org/projects/netlib/dirindexformat.html
-
*/
#include "nsEscape.h"
@@ -92,7 +88,11 @@ nsDirectoryIndexStream::Init(nsIFile* aDir)
if (MOZ_LOG_TEST(gLog, LogLevel::Debug)) {
nsAutoCString path;
+#ifdef XP_WIN
+ aDir->GetPersistentDescriptor(path);
+#else
aDir->GetNativePath(path);
+#endif
MOZ_LOG(gLog, LogLevel::Debug,
("nsDirectoryIndexStream[%p]: initialized on %s",
this, path.get()));
@@ -239,7 +239,11 @@ nsDirectoryIndexStream::Read(char* aBuf, uint32_t aCount, uint32_t* aReadCount)
if (MOZ_LOG_TEST(gLog, LogLevel::Debug)) {
nsAutoCString path;
+#ifdef XP_WIN
+ current->GetPersistentDescriptor(path);
+#else
current->GetNativePath(path);
+#endif
MOZ_LOG(gLog, LogLevel::Debug,
("nsDirectoryIndexStream[%p]: iterated %s",
this, path.get()));