From abc93ed1d45dc119f9ca8840b66ef479eaa06267 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 10 Oct 2003 04:16:44 +0000 Subject: [PATCH] work around windows and/or samba bug --- stepmania/src/RageUtil.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index 48f6fffa05..ccbf28da20 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -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. */