summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-12-04 18:42:08 +0000
committerrubidium <rubidium@openttd.org>2007-12-04 18:42:08 +0000
commit5f576e12aa23c828f4a79726d43647905c98f104 (patch)
tree851802b1cad6355dc450fc92f8e086354b63fa9f
parent5847abc9f833d4e61011982f72f842eb05a0eba9 (diff)
downloadopenttd-5f576e12aa23c828f4a79726d43647905c98f104.tar.xz
(svn r11569) -Fix [FS#1480]: full paths sometimes did not work correctly.
-rw-r--r--src/fileio.cpp6
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;
}