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 ?


_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to