diff options
author | rubidium <rubidium@openttd.org> | 2007-12-04 18:42:08 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-12-04 18:42:08 +0000 |
commit | 5f576e12aa23c828f4a79726d43647905c98f104 (patch) | |
tree | 851802b1cad6355dc450fc92f8e086354b63fa9f | |
parent | 5847abc9f833d4e61011982f72f842eb05a0eba9 (diff) | |
download | openttd-5f576e12aa23c828f4a79726d43647905c98f104.tar.xz |
(svn r11569) -Fix [FS#1480]: full paths sometimes did not work correctly.
-rw-r--r-- | src/fileio.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp index a2db03896..54a7ef932 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -350,6 +350,12 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, } } + /* Sometimes a full path is given. To support + * the 'subdirectory' must be 'removed'. */ + if (f == NULL && subdir != NO_DIRECTORY) { + f = FioFOpenFile(filename, mode, NO_DIRECTORY, filesize); + } + return f; } |