X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmUtil.cxx;h=4c053864a287ec7e4d79a998f0b6334c7d8aec58;hb=ecac4d36edf15736ae8f516ef3f9d8a6396ed54c;hp=cc9eff410e85cfc679dd9b64fcf6dfa0a2e5db6f;hpb=15915dd3b6d2c5e64f4a06a1516ae51b3cb9944a;p=gdcm.git diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index cc9eff41..4c053864 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.cxx,v $ Language: C++ - Date: $Date: 2004/06/25 19:37:05 $ - Version: $Revision: 1.46 $ + Date: $Date: 2004/07/17 22:47:01 $ + Version: $Revision: 1.47 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -102,12 +102,16 @@ void NormalizePath(std::string &name) */ std::string GetPath(std::string &fullName) { - int pos1=fullName.rfind("/"); - int pos2=fullName.rfind("\\"); - if(pos1>pos2) + int pos1 = fullName.rfind("/"); + int pos2 = fullName.rfind("\\"); + if( pos1 > pos2) + { fullName.resize(pos1); + } else + { fullName.resize(pos2); + } return fullName; }