]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkFactory.cxx
comment out cout s
[bbtk.git] / kernel / src / bbtkFactory.cxx
index 2a633d32c7bcd6a4c37fcb4c7c0e7e8272f80765..5c060075c20806d05dde4e55871ac1d4b24841b8 100644 (file)
@@ -4,8 +4,8 @@ Program:   bbtk
 Module:    $RCSfile: bbtkFactory.cxx,v $
 Language:  C++
 
-Date:      $Date: 2008/01/28 09:12:49 $
-Version:   $Revision: 1.3 $
+Date:      $Date: 2008/01/29 14:01:31 $
+Version:   $Revision: 1.6 $
                                                                                 
 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
@@ -298,7 +298,6 @@ namespace bbtk
       return;
     }
 
-
 // =================================================
 // The following structure was checked to work
 // with any type of relative/absolute path.
@@ -315,8 +314,17 @@ namespace bbtk
     // push it into vector of paths
     if (upath.length()>0)   // ------------------------------------- check user supplied location
     {
+       if (name[0] != '.' && name[0] != '/' && name[1]!= ':')
+       {
+          bbtkError("Use absolute or relative path name! ["<<name<<"] is an illegal name");
+          return;
+       }
+       
       // std::string path = Utilities::ExpandLibName(upath, verbose);
-      std::string path = Utilities::ExpandLibName(name, verbose); // keep last item, here.
+       std::string path;
+       if (name[1]!= ':')  // Absolute name, under Windows
+          path = Utilities::ExpandLibName(name, verbose); // keep last item, here.
+          
        if (path != "")
        {
           std::string p2;