From: malaterre Date: Fri, 15 Apr 2005 21:30:26 +0000 (+0000) Subject: ENH: Make sure noone is passing a name ending with a / at the end X-Git-Tag: Version1.2.bp~783 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=674aea3f45196f37b1107fb7cf17fb7ffbcdf15f;p=gdcm.git ENH: Make sure noone is passing a name ending with a / at the end --- diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index be62fcf1..27441507 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDirList.cxx,v $ Language: C++ - Date: $Date: 2005/04/15 21:21:42 $ - Version: $Revision: 1.47 $ + Date: $Date: 2005/04/15 21:30:26 $ + Version: $Revision: 1.48 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,6 +20,7 @@ #include "gdcmUtil.h" #include +#include #ifdef _MSC_VER #include @@ -62,6 +63,7 @@ DirList::~DirList() bool DirList::IsDirectory(std::string const &dirName) { struct stat fs; + assert( dirName[dirName.size()-1] != '/' ); if(stat(dirName.c_str(), &fs) == 0) { #if _WIN32