From 2cacee9b7faa782f54a2bc3da9bbc951bf1cd2bc Mon Sep 17 00:00:00 2001 From: "gordon%netscape.com" Date: Tue, 27 Jul 1999 01:12:59 +0000 Subject: [PATCH] Changed handling of pathnames under NECKO to avoid excess slashes "/". git-svn-id: svn://10.0.0.236/trunk@41199 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/chrome/src/nsChromeRegistry.cpp | 7 +++++-- mozilla/rdf/chrome/src/nsChromeRegistry.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mozilla/chrome/src/nsChromeRegistry.cpp b/mozilla/chrome/src/nsChromeRegistry.cpp index 735e2c65189..94e9a53ff39 100644 --- a/mozilla/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/chrome/src/nsChromeRegistry.cpp @@ -333,7 +333,10 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL) if (NS_FAILED(rv = GetChromeResource(chromeBase, chromeResource, kCHROME_base))) { // No base entry was found. Default to our cache. chromeBase = "resource:/chrome/"; - chromeBase += hostStr + "/"; + chromeBase += hostStr; +#ifndef NECKO + chromeBase += "/"; +#endif chromeBase += packageType + "/"; if (chromeName != "") chromeBase += chromeName + "/"; @@ -371,7 +374,7 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL) } else { -#if 0 +#ifdef NECKO // if path starts in a slash, remove it. if (path[0] == '/') path.Cut(0, 1); diff --git a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp index 735e2c65189..94e9a53ff39 100644 --- a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp @@ -333,7 +333,10 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL) if (NS_FAILED(rv = GetChromeResource(chromeBase, chromeResource, kCHROME_base))) { // No base entry was found. Default to our cache. chromeBase = "resource:/chrome/"; - chromeBase += hostStr + "/"; + chromeBase += hostStr; +#ifndef NECKO + chromeBase += "/"; +#endif chromeBase += packageType + "/"; if (chromeName != "") chromeBase += chromeName + "/"; @@ -371,7 +374,7 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL) } else { -#if 0 +#ifdef NECKO // if path starts in a slash, remove it. if (path[0] == '/') path.Cut(0, 1);