(svn r7766) -Fix: [OSX] removed incorrect debug message about corrupted/missing grf files
The md5 code now looks in the secundary data dir as well
Note: OSX builds can still give the incorrect message: dbg: [sl] Cannot open savegame 'data/opntitle.dat' for saving/loading.
--- a/src/gfxinit.c Tue Jan 02 20:35:16 2007 +0000
+++ b/src/gfxinit.c Tue Jan 02 20:39:07 2007 +0000
@@ -121,6 +121,20 @@
}
#endif
+#if defined SECOND_DATA_DIR
+ /* If we failed to find the file in the first data directory, we will try the other one */
+
+ if (f == NULL) {
+ snprintf(buf, lengthof(buf), "%s%s", _paths.second_data_dir, file.filename);
+ f = fopen(buf, "rb");
+
+ if (f == NULL) {
+ strtolower(buf + strlen(_paths.second_data_dir) - 1);
+ f = fopen(buf, "rb");
+ }
+ }
+#endif
+
if (f != NULL) {
md5_state_t filemd5state;
md5_byte_t buffer[1024];