mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 14:24:43 +00:00
refactor file interface. requires workspace update
- separate file_system_util into vfs functions (-> vfs/vfs_util) and file_system (avoids ugly fs_util namespace prefix) - get rid of non-portable O_BINARY_NP etc. flags - use standard O_WRONLY etc. flags instead of LIO_WRITE; but avoid the need for specifying O_CREAT|O_TRUNC - only open files for aio when O_DIRECT is specified (which 0ad does not) - avoids wasting time and security issues - return file descriptor directly instead of via output param - waio: safer FCB mechanism that avoids mixing descriptors between lowio and aio This was SVN commit r9550.
This commit is contained in:
@@ -825,7 +825,7 @@ bool ScriptInterface::LoadGlobalScript(const VfsPath& filename, const std::wstri
|
||||
|
||||
bool ScriptInterface::LoadGlobalScriptFile(const VfsPath& path)
|
||||
{
|
||||
if (!VfsFileExists(g_VFS, path))
|
||||
if (!VfsFileExists(path))
|
||||
{
|
||||
LOGERROR(L"File '%ls' does not exist", path.string().c_str());
|
||||
return false;
|
||||
@@ -911,7 +911,7 @@ CScriptValRooted ScriptInterface::ParseJSON(const std::string& string_utf8)
|
||||
|
||||
CScriptValRooted ScriptInterface::ReadJSONFile(const VfsPath& path)
|
||||
{
|
||||
if (!VfsFileExists(g_VFS, path))
|
||||
if (!VfsFileExists(path))
|
||||
{
|
||||
LOGERROR(L"File '%ls' does not exist", path.string().c_str());
|
||||
return CScriptValRooted();
|
||||
|
||||
Reference in New Issue
Block a user