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 | eb0be0322ab668e863082ec8e271243ea8683c38 (patch) | |
tree | 851802b1cad6355dc450fc92f8e086354b63fa9f | |
parent | 586d2da917f2d5c3d08024f0e67180ae884e93af (diff) | |
download | openttd-eb0be0322ab668e863082ec8e271243ea8683c38.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; } |