ecere/sys/MakeDir(): (#899) Fixed proper return status for MakeDir()
authorJerome St-Louis <jerome@ecere.com>
Thu, 8 Aug 2013 06:02:55 +0000 (02:02 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 8 Aug 2013 06:02:55 +0000 (02:02 -0400)
ecere/src/sys/System.c

index d044b8b..496b844 100644 (file)
@@ -156,13 +156,12 @@ bool System_MakeDir(char * path)
       if(FILE_FileExists(location) != isDirectory)
       {
 #if defined(__unix__) || defined(__APPLE__)
-         mkdir(location, 0755);
+         result = !mkdir(location, 0755);
 #else
          uint16 _wlocation[MAX_LOCATION];
          __ecereNameSpace__ecere__sys__UTF8toUTF16Buffer(location, _wlocation, MAX_LOCATION);
-         _wmkdir(_wlocation);
+         result = !_wmkdir(_wlocation);
 #endif
-         result = true;
       }
    }
    return result;