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
commiteb0be0322ab668e863082ec8e271243ea8683c38 (patch)
tree851802b1cad6355dc450fc92f8e086354b63fa9f
parent586d2da917f2d5c3d08024f0e67180ae884e93af (diff)
downloadopenttd-eb0be0322ab668e863082ec8e271243ea8683c38.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;
}