From f716502ff7297ca7069f7ce3da9c4f4792fe6318 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 7 May 2007 21:27:27 +0000 Subject: [PATCH] fix uninitialized on error --- stepmania/src/RageFileDriverDirectHelpers.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stepmania/src/RageFileDriverDirectHelpers.cpp b/stepmania/src/RageFileDriverDirectHelpers.cpp index e8355fe712..3d7b5f75e9 100644 --- a/stepmania/src/RageFileDriverDirectHelpers.cpp +++ b/stepmania/src/RageFileDriverDirectHelpers.cpp @@ -164,8 +164,7 @@ bool CreateDirectories( RString Path ) /* Make sure it's a directory. */ struct stat st; - DoStat( curpath, &st ); - if( !(st.st_mode & S_IFDIR) ) + if( DoStat(curpath, &st) != -1 && !(st.st_mode & S_IFDIR) ) { WARN( ssprintf("Couldn't create %s: path exists and is not a directory", curpath.c_str()) );