From 0ee69eac894acfe09151eb97b488286a9c96fcfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 10 Sep 2007 13:20:32 +0000 Subject: [PATCH] Fix File::GetFullPath() svn path=/trunk/; revision=28991 --- reactos/tools/rbuild/module.cpp | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp index e95a9c1fd7d..f535a56e622 100644 --- a/reactos/tools/rbuild/module.cpp +++ b/reactos/tools/rbuild/module.cpp @@ -1256,11 +1256,26 @@ File::ProcessXML() std::string File::GetFullPath () const { - // TODO FIXME take care of file.directory? return a full path? + string directory ( "" ); + switch ( file.directory ) + { + case SourceDirectory: + break; + case IntermediateDirectory: + directory = Environment::GetIntermediatePath () + sSep; + break; + default: + throw InvalidOperationException ( __FILE__, + __LINE__, + "Invalid directory %d.", + file.directory ); + } + if ( file.relative_path.length () > 0 ) - return file.relative_path + sSep + file.name; - else - return file.name; + directory += file.relative_path + sSep; + + + return directory + file.name; }