зеркало из https://github.com/mozilla/pjs.git
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
This commit is contained in:
Родитель
87183532c2
Коммит
4216f27fa7
|
@ -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, "/");
|
||||
}
|
||||
|
|
|
@ -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, "/");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче