merge branch work back into trunk
[xonotic/netradiant.git] / radiant / missing.cpp
index deafb6389c31c545b9b66675fc1ecce5a1f3df95..e610fbb02b4ec6a216edd18fde5d91f87a4ab5e4 100644 (file)
@@ -208,11 +208,11 @@ EPathCheck CheckFile( const char *path ) {
 }
 
 bool radCreateDirectory( const char *directory ) {
-       return CreateDirectory( directory, NULL ) != false;
+       return ( CreateDirectory( directory, NULL ) != false );
 }
 
 bool radCopyFile( const char *lpExistingFileName, const char *lpNewFileName ) {
-       return CopyFile( lpExistingFileName, lpNewFileName, FALSE ) != false;
+       return ( CopyFile( lpExistingFileName, lpNewFileName, FALSE ) != false );
 }
 
 #endif
@@ -239,7 +239,10 @@ bool CopyTree( const char *source, const char *dest ) {
                switch ( CheckFile( srcEntry.GetBuffer() ) ) {
                        case PATH_DIRECTORY: {
                                if ( CheckFile( dstEntry.GetBuffer() ) == PATH_FAIL ) {
-                                       radCreateDirectory( dstEntry.GetBuffer() );
+                                       if ( !radCreateDirectory( dstEntry.GetBuffer() ) ) {
+                                               Sys_Printf( "create directory %s failed\n", dstEntry.GetBuffer() );
+                                               return false;
+                                       }
                                }
                                bool ret;
                                ret = CopyTree( srcEntry.GetBuffer(), dstEntry.GetBuffer() );