mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- Fixed: Compilation errors on Mac OS X.
SVN r2824 (trunk)
This commit is contained in:
parent
20513cff41
commit
b50007ecf6
2 changed files with 5 additions and 2 deletions
|
@ -1004,7 +1004,8 @@ void ScanDirectory(TArray<FFileList> &list, const char *dirpath)
|
|||
|
||||
void ScanDirectory(TArray<FFileList> &list, const char *dirpath)
|
||||
{
|
||||
const char **argv[] = {dirpath, NULL };
|
||||
char * const argv[] = {new char[strlen(dirpath)+1], NULL };
|
||||
memcpy(argv[0], dirpath, strlen(dirpath)+1);
|
||||
FTS *fts;
|
||||
FTSENT *ent;
|
||||
|
||||
|
@ -1012,6 +1013,7 @@ void ScanDirectory(TArray<FFileList> &list, const char *dirpath)
|
|||
if (fts == NULL)
|
||||
{
|
||||
I_Error("Failed to start directory traversal: %s\n", strerror(errno));
|
||||
delete[] argv[0];
|
||||
return;
|
||||
}
|
||||
while ((ent = fts_read(fts)) != NULL)
|
||||
|
@ -1037,5 +1039,6 @@ void ScanDirectory(TArray<FFileList> &list, const char *dirpath)
|
|||
}
|
||||
}
|
||||
fts_close(fts);
|
||||
delete[] argv[0];
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1077,7 +1077,7 @@ static FString GetCachePath()
|
|||
FSRef folder;
|
||||
|
||||
if (noErr == FSFindFolder(kLocalDomain, kApplicationSupportFolderType, kCreateFolder, &folder) &&
|
||||
noErr == FSRefMakePath(&folder, (UInt8*)cpath, PATH_MAX))
|
||||
noErr == FSRefMakePath(&folder, (UInt8*)path.GetChars(), PATH_MAX))
|
||||
{
|
||||
path = pathstr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue