[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[glob2-devel] Strange thing in FileManager
From: |
Sébastien |
Subject: |
[glob2-devel] Strange thing in FileManager |
Date: |
Wed, 26 Apr 2006 11:28:22 +0200 |
User-agent: |
KMail/1.9.1 |
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] Strange thing in FileManager,
Sébastien <=