From 4216f27fa7700efda6d3b96abd0c512235589019 Mon Sep 17 00:00:00 2001 From: "andreas.otte%primus-online.de" Date: Fri, 5 May 2000 21:08:31 +0000 Subject: [PATCH] fix bug 37801, SetFile does not add a / in front of the path before calling SetPath on XP_PC, the fix is more general and applys to all platforms, r=cmanske@netscape.com --- netwerk/base/src/nsAuthURLParser.cpp | 7 +++++++ netwerk/base/src/nsNoAuthURLParser.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/netwerk/base/src/nsAuthURLParser.cpp b/netwerk/base/src/nsAuthURLParser.cpp index 0f7bb39d629..92a5e008a82 100644 --- a/netwerk/base/src/nsAuthURLParser.cpp +++ b/netwerk/base/src/nsAuthURLParser.cpp @@ -406,6 +406,13 @@ nsAuthURLParser::ParseAtDirectory(const char* i_Path, char* *o_Directory, if (file != dirfile) { ExtractString(dirfile, o_Directory, (file - dirfile)+1); + if (*dirfile != '/') { + nsCAutoString dir; + dir += "/" ; + dir += *o_Directory; + CRTFREEIF(*o_Directory); + *o_Directory = dir.ToNewCString(); + } } else { DupString(o_Directory, "/"); } diff --git a/netwerk/base/src/nsNoAuthURLParser.cpp b/netwerk/base/src/nsNoAuthURLParser.cpp index d4716b240e4..22d343450e2 100644 --- a/netwerk/base/src/nsNoAuthURLParser.cpp +++ b/netwerk/base/src/nsNoAuthURLParser.cpp @@ -248,6 +248,13 @@ nsNoAuthURLParser::ParseAtDirectory(const char* i_Path, char* *o_Directory, if (file != dirfile) { ExtractString(dirfile, o_Directory, (file - dirfile)+1); + if (*dirfile != '/') { + nsCAutoString dir; + dir += "/" ; + dir += *o_Directory; + CRTFREEIF(*o_Directory); + *o_Directory = dir.ToNewCString(); + } } else { DupString(o_Directory, "/"); }