Fixed compilation of non-Windows targets

These are quick hacks to be improved later
This commit is contained in:
alexey.lysiuk 2017-12-03 10:11:54 +02:00
parent 52be9895b7
commit 8129afdd1f
2 changed files with 4 additions and 7 deletions

View File

@ -209,7 +209,10 @@ int FDirectory::AddDirectory(const char *dirpath)
FString fullFileName = scanDirectories[i] + file->d_name; FString fullFileName = scanDirectories[i] + file->d_name;
if(DirExists(fullFileName.GetChars())) struct stat fileStat;
stat(fullFileName.GetChars(), &fileStat);
if(S_ISDIR(fileStat.st_mode))
{ {
scanDirectories.Push(scanDirectories[i] + file->d_name + "/"); scanDirectories.Push(scanDirectories[i] + file->d_name + "/");
continue; continue;

View File

@ -172,12 +172,6 @@ static FILE *mktempfile_internal(const char *tmpdir, const char *pfx, FString *t
{ /* Success, so return user a proper ANSI C file pointer */ { /* Success, so return user a proper ANSI C file pointer */
fp = FDOPEN_(fd, "w+b"); fp = FDOPEN_(fd, "w+b");
errno = 0; errno = 0;
#ifndef _WIN32
/* [Unix only] And make sure the file will be deleted once closed */
if (!keep) remove(tmpname);
#endif
} }
else else
{ /* We failed */ { /* We failed */