fixed lots of tabs and space

This commit is contained in:
Thomas "elfprince13" Dickerson 2017-01-06 18:04:28 -05:00
parent d30a3f9271
commit bb38a40bcb
53 changed files with 2695 additions and 2695 deletions

View file

@ -68,54 +68,54 @@ bool dFileTouch(const char *path)
//-----------------------------------------------------------------------------
bool dPathCopy(const char* source, const char* dest, bool nooverwrite)
{
if(source == NULL || dest == NULL)
return false;
@autoreleasepool {
NSFileManager *manager = [NSFileManager defaultManager];
NSString *nsource = [manager stringWithFileSystemRepresentation:source length:dStrlen(source)];
NSString *ndest = [manager stringWithFileSystemRepresentation:dest length:dStrlen(dest)];
NSString *ndestFolder = [ndest stringByDeletingLastPathComponent];
if(! [manager fileExistsAtPath:nsource])
{
Con::errorf("dPathCopy: no file exists at %s",source);
return false;
}
if( [manager fileExistsAtPath:ndest] )
{
if(nooverwrite)
{
Con::errorf("dPathCopy: file already exists at %s",dest);
return false;
}
Con::warnf("Deleting files at path: %s", dest);
if(![manager removeItemAtPath:ndest error:nil] || [manager fileExistsAtPath:ndest])
{
Con::errorf("Copy failed! Could not delete files at path: %s", dest);
return false;
}
}
if([manager fileExistsAtPath:ndestFolder] == NO)
{
ndestFolder = [ndestFolder stringByAppendingString:@"/"]; // createpath requires a trailing slash
Platform::createPath([ndestFolder UTF8String]);
}
bool ret = [manager copyItemAtPath:nsource toPath:ndest error:nil];
// n.b.: The "success" semantics don't guarantee a copy actually took place, so we'll verify
// because this is surprising behavior for a method called copy.
if( ![manager fileExistsAtPath:ndest] )
{
Con::warnf("The filemanager returned success, but the file was not copied. Something strange is happening");
ret = false;
}
return ret;
}
if(source == NULL || dest == NULL)
return false;
@autoreleasepool {
NSFileManager *manager = [NSFileManager defaultManager];
NSString *nsource = [manager stringWithFileSystemRepresentation:source length:dStrlen(source)];
NSString *ndest = [manager stringWithFileSystemRepresentation:dest length:dStrlen(dest)];
NSString *ndestFolder = [ndest stringByDeletingLastPathComponent];
if(! [manager fileExistsAtPath:nsource])
{
Con::errorf("dPathCopy: no file exists at %s",source);
return false;
}
if( [manager fileExistsAtPath:ndest] )
{
if(nooverwrite)
{
Con::errorf("dPathCopy: file already exists at %s",dest);
return false;
}
Con::warnf("Deleting files at path: %s", dest);
if(![manager removeItemAtPath:ndest error:nil] || [manager fileExistsAtPath:ndest])
{
Con::errorf("Copy failed! Could not delete files at path: %s", dest);
return false;
}
}
if([manager fileExistsAtPath:ndestFolder] == NO)
{
ndestFolder = [ndestFolder stringByAppendingString:@"/"]; // createpath requires a trailing slash
Platform::createPath([ndestFolder UTF8String]);
}
bool ret = [manager copyItemAtPath:nsource toPath:ndest error:nil];
// n.b.: The "success" semantics don't guarantee a copy actually took place, so we'll verify
// because this is surprising behavior for a method called copy.
if( ![manager fileExistsAtPath:ndest] )
{
Con::warnf("The filemanager returned success, but the file was not copied. Something strange is happening");
ret = false;
}
return ret;
}
}
//-----------------------------------------------------------------------------
@ -124,36 +124,36 @@ bool dFileRename(const char *source, const char *dest)
{
if(source == NULL || dest == NULL)
return false;
@autoreleasepool {
NSFileManager *manager = [NSFileManager defaultManager];
NSString *nsource = [manager stringWithFileSystemRepresentation:source length:dStrlen(source)];
NSString *ndest = [manager stringWithFileSystemRepresentation:dest length:dStrlen(dest)];
if(! [manager fileExistsAtPath:nsource])
{
Con::errorf("dFileRename: no file exists at %s",source);
return false;
}
if( [manager fileExistsAtPath:ndest] )
{
Con::warnf("dFileRename: Deleting files at path: %s", dest);
}
bool ret = [manager moveItemAtPath:nsource toPath:ndest error:nil];
// n.b.: The "success" semantics don't guarantee a move actually took place, so we'll verify
// because this is surprising behavior for a method called rename.
if( ![manager fileExistsAtPath:ndest] )
{
Con::warnf("The filemanager returned success, but the file was not moved. Something strange is happening");
ret = false;
}
return ret;
}
@autoreleasepool {
NSFileManager *manager = [NSFileManager defaultManager];
NSString *nsource = [manager stringWithFileSystemRepresentation:source length:dStrlen(source)];
NSString *ndest = [manager stringWithFileSystemRepresentation:dest length:dStrlen(dest)];
if(! [manager fileExistsAtPath:nsource])
{
Con::errorf("dFileRename: no file exists at %s",source);
return false;
}
if( [manager fileExistsAtPath:ndest] )
{
Con::warnf("dFileRename: Deleting files at path: %s", dest);
}
bool ret = [manager moveItemAtPath:nsource toPath:ndest error:nil];
// n.b.: The "success" semantics don't guarantee a move actually took place, so we'll verify
// because this is surprising behavior for a method called rename.
if( ![manager fileExistsAtPath:ndest] )
{
Con::warnf("The filemanager returned success, but the file was not moved. Something strange is happening");
ret = false;
}
return ret;
}
}
//-----------------------------------------------------------------------------
@ -857,7 +857,7 @@ static bool recurseDumpDirectories(const char *basePath, const char *subPath, Ve
while (d = readdir(dip))
{
bool isDir;
bool isDir;
isDir = false;
if (d->d_type == DT_UNKNOWN)
{