From f45e3b306850405d5f32fc184cc3dfd3a31ed6cc Mon Sep 17 00:00:00 2001 From: glx Date: Tue, 10 Mar 2009 14:54:46 +0000 Subject: [PATCH] (svn r15664) -Fix [FS#2716]: as always windows needs special handling when strings are involved --- src/fios.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fios.cpp b/src/fios.cpp index 7a0573acb5..cff6491a41 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -230,8 +230,13 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length) } FiosItem *fios = _fios_items.Append(); +#ifdef WIN32 + struct _stat sb; + if (_tstat(OTTD2FS(filename), &sb) == 0) { +#else struct stat sb; if (stat(filename, &sb) == 0) { +#endif fios->mtime = sb.st_mtime; } else { fios->mtime = 0;