diff options
author | michi_cc <michi_cc@openttd.org> | 2009-03-14 00:25:59 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2009-03-14 00:25:59 +0000 |
commit | b1479bec02f7cf426e44d273a40a2a31b4c6e0ae (patch) | |
tree | 61555d72d05f2c2429f6e54a9c8c0e9b11354a9e /src/fios.cpp | |
parent | fa35dc10e5e2924f971e6787d74d3f229514960b (diff) | |
download | openttd-b1479bec02f7cf426e44d273a40a2a31b4c6e0ae.tar.xz |
(svn r15706) -Fix: Make sure the filename passed to unlink() is always in file system encoding.
Diffstat (limited to 'src/fios.cpp')
-rw-r--r-- | src/fios.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/fios.cpp b/src/fios.cpp index cff6491a4..951536406 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -17,7 +17,6 @@ # include <io.h> # endif # define access _taccess -# define unlink _tunlink #else # include <unistd.h> #endif /* WIN32 */ @@ -161,16 +160,12 @@ void FiosMakeSavegameName(char *buf, const char *name, size_t size) #endif } -#if defined(WIN32) -# define unlink _tunlink -#endif - bool FiosDelete(const char *name) { char filename[512]; FiosMakeSavegameName(filename, name, lengthof(filename)); - return unlink(OTTD2FS(filename)) == 0; + return unlink(filename) == 0; } bool FileExists(const char *filename) |