- Fix 38352, XMLLoadFile seems to need a separate instance of Path, so revert that optimisation and leave it only to NormalizeFilename.

svn path=/trunk/; revision=38353
This commit is contained in:
Aleksey Bragin 2008-12-26 13:25:55 +00:00
parent 03a011db89
commit fd4de76baf
2 changed files with 7 additions and 5 deletions

View file

@ -24,6 +24,8 @@
using std::string;
using std::vector;
static const Path defaultPath;
string
Right ( const string& s, size_t n )
{
@ -161,8 +163,9 @@ NormalizeFilename ( const string& filename )
{
if ( filename == "" )
return "";
string normalizedPath = defaultPath.Fixup ( filename, true );
string relativeNormalizedPath = defaultPath.RelativeFromWorkingDirectory ( normalizedPath );
Path path;
string normalizedPath = path.Fixup ( filename, true );
string relativeNormalizedPath = path.RelativeFromWorkingDirectory ( normalizedPath );
return FixSeparator ( relativeNormalizedPath );
}

View file

@ -25,8 +25,6 @@
using std::string;
using std::vector;
const Path defaultPath;
/* static */ string
Environment::GetVariable ( const string& name )
{
@ -261,7 +259,8 @@ Project::ExecuteInvocations ()
void
Project::ReadXml ()
{
head = XMLLoadFile ( xmlfile, defaultPath, xmlbuildfiles );
Path path;
head = XMLLoadFile ( xmlfile, path, xmlbuildfiles );
node = NULL;
for ( size_t i = 0; i < head->subElements.size (); i++ )
{