summaryrefslogtreecommitdiffstats
path: root/source/cFile.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-16 22:28:14 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-16 22:28:14 +0200
commit33ca4d5003059d7d1f4b9e29649693ec0e5be262 (patch)
tree7bfb4ec7c1d3fcc46c341406667033ec051f010c /source/cFile.cpp
parentWindows compilation fix after Android changes (diff)
downloadcuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.gz
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.bz2
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.lz
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.xz
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.zst
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.zip
Diffstat (limited to 'source/cFile.cpp')
-rw-r--r--source/cFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/cFile.cpp b/source/cFile.cpp
index 32de28fe0..5558bfd45 100644
--- a/source/cFile.cpp
+++ b/source/cFile.cpp
@@ -76,14 +76,14 @@ bool cFile::Open(const AString & iFileName, EMode iMode)
return false;
}
}
- m_File = fopen(iFileName.c_str(), Mode);
+ m_File = fopen( (FILE_IO_PREFIX + iFileName).c_str(), Mode);
if ((m_File == NULL) && (iMode == fmReadWrite))
{
// Fix for MS not following C spec, opening "a" mode files for writing at the end only
// The file open operation has been tried with "read update", fails if file not found
// So now we know either the file doesn't exist or we don't have rights, no need to worry about file contents.
// Simply re-open for read-writing, erasing existing contents:
- m_File = fopen(iFileName.c_str(), "wb+");
+ m_File = fopen( (FILE_IO_PREFIX + iFileName).c_str(), "wb+");
}
return (m_File != NULL);
}