]> Creatis software - bbtk.git/commitdiff
paths
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Tue, 29 Jan 2008 13:54:47 +0000 (13:54 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Tue, 29 Jan 2008 13:54:47 +0000 (13:54 +0000)
kernel/src/bbtkInterpreter.cxx

index 32c824934102ee290d336a5d281e91017d88ffb5..39f1cbec9dcc62e39d4252bbef4f697ff0e68eea 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/01/29 13:34:59 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/01/29 13:54:47 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -821,15 +821,16 @@ verbose = true;
     // (not only a plain script name)
     // we trust him, and try to explade the directory name
     // WARNING : starting from current local directory :  ./whatYouWant  (./ mandatory!)
-    
-    if (slash_position != std::string::npos)
+      
+   // if (slash_position != std::string::npos)
+    if (name[0]=='/' || name[1] == ':')
     { 
 
       // ===========================================================check user supplied location
       fullnameGiven = true;
       
       fullPathScriptName =  Utilities::ExpandLibName(name, verbose);
-      
+   
       // allow user to always forget ".bbs"
       int l = fullPathScriptName.size();
       if (l!=0) {
@@ -854,7 +855,8 @@ verbose = true;
       //}
       } // endif l != 0
     }
-    else    
+    else 
+      
       // =============================================================== iterate on the paths
       {
        std::cout << "iterate"<<std::endl;
@@ -876,7 +878,7 @@ verbose = true;
 
        // fullPathScriptName = Utilities::MakePkgnameFromPath(path, name, true); //pkgname);
 
-       fullPathScriptName = Utilities::MakePkgnameFromPath(path, pkgname, true);
+       fullPathScriptName = Utilities::MakePkgnameFromPath(path, /*pkgnam*/ name, true);
        std::cout << "FULL PATH = "<<fullPathScriptName<<std::endl;
        
       // Check if library exists