X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkConfigurationFile.cxx;h=d558b5c087bc24db436d38a4fce6818e249bccf0;hb=310a70fea52f768e60d0a844e6ef84f13e4babd4;hp=d5e4e99afaf4ae395c4d840279942ecdc0381738;hpb=2d2fc4c6349d5040a9f13a240f079e7a1c6687dd;p=bbtk.git diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx index d5e4e99..d558b5c 100644 --- a/kernel/src/bbtkConfigurationFile.cxx +++ b/kernel/src/bbtkConfigurationFile.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkConfigurationFile.cxx,v $ Language: C++ - Date: $Date: 2008/11/12 12:47:00 $ - Version: $Revision: 1.21 $ + Date: $Date: 2008/11/21 15:26:44 $ + Version: $Revision: 1.22 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -262,6 +262,16 @@ namespace bbtk { if (pname[idx] == '\\') pname[idx] = '/'; } + + for (idx = len-1; idx >=0 ; idx--) + { + if (pname[idx] == '/') + { + pname[idx+1] = '\0'; + idx = -1; + } + } + if ((access(pname, 0) == 0)) return 0; /* file exists, return OK */ /*else name doesn't seem to exist, return FAIL (falls @@ -363,6 +373,7 @@ namespace bbtk { *slash = 0; } +printf("EED ConfigurationFile::GetExecutablePath %s\n",name); return name; }