From fd4de76baf2b0e8e7555ac45488b196f6c2d2000 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 26 Dec 2008 13:25:55 +0000 Subject: [PATCH] - 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 --- reactos/tools/rbuild/module.cpp | 7 +++++-- reactos/tools/rbuild/project.cpp | 5 ++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp index 0eb620a0940..4e80d8efc5e 100644 --- a/reactos/tools/rbuild/module.cpp +++ b/reactos/tools/rbuild/module.cpp @@ -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 ); } diff --git a/reactos/tools/rbuild/project.cpp b/reactos/tools/rbuild/project.cpp index 72574247c62..8366ce9664d 100644 --- a/reactos/tools/rbuild/project.cpp +++ b/reactos/tools/rbuild/project.cpp @@ -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++ ) {