Le Mercredi 26 Avril 2006 14:12, Stéphane Magnenat a écrit :
> On Wednesday 26 April 2006 11:28, Sébastien wrote:
> > I found something strange :
> >     void FileManager::addWriteSubdir(const std::string &subdir)
> >     {
> >             for (size_t i = 0; i < dirList.size(); i++)
> >             {
> >                     std::string toCreate(dirList[i]);
> >                     toCreate += '/';
> >                     toCreate += subdir;
> >                     #ifdef WIN32
> >                     int result = _mkdir(toCreate.c_str());
> >                     #else
> >                     int result = mkdir(toCreate.c_str(), S_IRWXU);
> >                     #endif
> >                     // NOTE : We only want to create the subdir for the 
> > first index
> >     //              if (result==0)
> >                             break;
> >                     if ((result==-1) && (errno==EEXIST))
> >                             break;
> >             }
> >     }
> > Note the if(result==0) is commented so we always make a break and so we
> > never do more than one loop... Am I wrong ?
>
> Well, the comment is coherent with the code. But it's not added it (nor did
> the change).
>
> Steph
>
>
> _______________________________________________
> glob2-devel mailing list
> glob2-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/glob2-devel
So I suppress the for loop ?


_______________________________________________
glob2-devel mailing list
glob2-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to