work around windows and/or samba bug

This commit is contained in:
Glenn Maynard
2003-10-10 04:16:44 +00:00
parent 0f09ef2103
commit abc93ed1d4
+9 -1
View File
@@ -348,7 +348,15 @@ bool CreateDirectories( CString Path )
{
if( LOG )
LOG->Warn("Couldn't create %s: %s", curpath.c_str(), strerror(errno) );
return false;
/* When creating a directory that already exists over Samba, Windows is
* returning ENOENT instead of EEXIST. Continue if we get that error, but
* log it just in case it was a real ENOENT. (Otherwise, we'll fail to
* create a directory when we could have succeeded.) */
if( errno != ENOENT )
return false;
else
continue;
}
/* Make sure it's a directory. */