[opengtl-commits] [726] user shiva kernel are not directly in the user home directory

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 726
Author:   cyrille
Date:     2009-04-15 00:21:05 +0200 (Wed, 15 Apr 2009)

Log Message:
-----------
user shiva kernel are not directly in the user home directory

Modified Paths:
--------------
    trunk/OpenGTL/OpenShiva/OpenShiva/SourcesCollection.cpp


Modified: trunk/OpenGTL/OpenShiva/OpenShiva/SourcesCollection.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/SourcesCollection.cpp	2009-04-11 16:44:59 UTC (rev 725)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/SourcesCollection.cpp	2009-04-14 22:21:05 UTC (rev 726)
@@ -41,10 +41,13 @@
 {
   std::set< llvm::sys::Path > content;
   path.getDirectoryContents( content, 0 );
+  SHIVA_DEBUG( "Looking for kernel in: " << path.toString() );
   foreach( const llvm::sys::Path& path, content )
   {
+    SHIVA_DEBUG( "Kernel: " << path.toString() << "?" );
     if( GTLCore::String( path.getSuffix() ).toLower() == "shiva" )
     {
+      SHIVA_DEBUG("Loading: " << path.toString() );
       Source* kernel = new Source( );
       kernel->loadFromFile( path.c_str() );
       kernels.push_back( kernel );
@@ -55,7 +58,7 @@
 SourcesCollection::SourcesCollection() : d(new Private)
 {
   addDirectory( _OPENSHIVA_SHIVA_KERNELS_DIR_ );
-  d->addDirectory( llvm::sys::Path::GetUserHomeDirectory() );
+  addDirectory( llvm::sys::Path::GetUserHomeDirectory().toString() + "/.OpenGTL/shiva/kernels" );
 }
 
 SourcesCollection::~SourcesCollection()


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/