Author: hpoussin
Date: Mon Sep 10 17:20:32 2007
New Revision: 28991
URL:
http://svn.reactos.org/svn/reactos?rev=28991&view=rev
Log:
Fix File::GetFullPath()
Modified:
trunk/reactos/tools/rbuild/module.cpp
Modified: trunk/reactos/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/module.cpp (original)
+++ trunk/reactos/tools/rbuild/module.cpp Mon Sep 10 17:20:32 2007
@@ -1256,11 +1256,26 @@
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;
}