]> Creatis software - gdcm.git/blobdiff - src/gdcmDictSet.cxx
2002-12-6 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
[gdcm.git] / src / gdcmDictSet.cxx
index c8f594b33cc60904162cf393baee1cbe9ff194a3..3e0cc03678c6a58a993b25629a54cd2752d4d899 100644 (file)
@@ -16,9 +16,13 @@ gdcmDictSet::gdcmDictSet(void) {
 void gdcmDictSet::SetDictPath(void) {
        const char* EnvPath = (char*)0;
        EnvPath = getenv("GDCM_DICT_PATH");
-       if (EnvPath && (strlen(EnvPath) != 0))
+       if (EnvPath && (strlen(EnvPath) != 0)) {
                DictPath = EnvPath;
-       else
+               if (DictPath[DictPath.length() -1] != '/' )
+                       DictPath += '/';
+               dbg.Verbose(1, "gdcmDictSet::SetDictPath:",
+                     "Dictionary path set from environnement");
+       } else
                DictPath = PUB_DICT_PATH;
 }
 
@@ -30,7 +34,8 @@ int gdcmDictSet::LoadDicomV3Dict(void) {
 
 int gdcmDictSet::LoadDictFromFile(string FileName, DictKey Name) {
        gdcmDict *NewDict = new gdcmDict(FileName.c_str());
-       dicts[Name] = NewDict; 
+       dicts[Name] = NewDict;
+       return 0;   //FIXME if this is a dummy return make the method void
 }
 
 void gdcmDictSet::Print(ostream& os) {