mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Fix issues from review
This commit is contained in:
@ -2346,10 +2346,10 @@ void plClient::IDetectAudioVideoSettings()
|
|||||||
|
|
||||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||||
// internal builds can use the local dir
|
// internal builds can use the local dir
|
||||||
if (plFileInfo("init//audio.ini").Exists())
|
if (plFileInfo("init/audio.ini").Exists())
|
||||||
audioIniFile = "init//audio.ini";
|
audioIniFile = "init/audio.ini";
|
||||||
if (plFileInfo("init//graphics.ini").Exists())
|
if (plFileInfo("init/graphics.ini").Exists())
|
||||||
graphicsIniFile = "init//graphics.ini";
|
graphicsIniFile = "init/graphics.ini";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//check to see if audio.ini exists
|
//check to see if audio.ini exists
|
||||||
|
@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <cstdlib>
|
# include <cstdlib>
|
||||||
# include <functional>
|
# include <functional>
|
||||||
|
# include <memory>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "plProduct.h"
|
#include "plProduct.h"
|
||||||
@ -162,7 +163,7 @@ plFileName plFileName::AbsolutePath() const
|
|||||||
path = plString::FromWchar(path_sm);
|
path = plString::FromWchar(path_sm);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
char *path_a = realpath(path.c_str(), nullptr);
|
char *path_a = realpath(path.fName.c_str(), nullptr);
|
||||||
hsAssert(path_a, "Failure to get absolute path (unsupported libc?)");
|
hsAssert(path_a, "Failure to get absolute path (unsupported libc?)");
|
||||||
path = path_a;
|
path = path_a;
|
||||||
free(path_a);
|
free(path_a);
|
||||||
@ -307,7 +308,7 @@ bool plFileSystem::Copy(const plFileName &from, const plFileName &to)
|
|||||||
count = fread(buffer, sizeof(uint8_t), arrsize(buffer), ffrom.get());
|
count = fread(buffer, sizeof(uint8_t), arrsize(buffer), ffrom.get());
|
||||||
if (ferror(ffrom.get()))
|
if (ferror(ffrom.get()))
|
||||||
return false;
|
return false;
|
||||||
fwrite(data, sizeof(uint8_t), count, fto.get());
|
fwrite(buffer, sizeof(uint8_t), count, fto.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -651,7 +651,7 @@ bool plSecureStream::IsSecureFile(const plFileName& fileName)
|
|||||||
FILE_ATTRIBUTE_NORMAL, // normal file attributes
|
FILE_ATTRIBUTE_NORMAL, // normal file attributes
|
||||||
NULL); // no template
|
NULL); // no template
|
||||||
#elif HS_BUILD_FOR_UNIX
|
#elif HS_BUILD_FOR_UNIX
|
||||||
fp = plFileSystem::Open(fileName);
|
fp = plFileSystem::Open(fileName, "rb");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fp == INVALID_HANDLE_VALUE)
|
if (fp == INVALID_HANDLE_VALUE)
|
||||||
|
Reference in New Issue
Block a user