summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fios.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fios.cpp b/src/fios.cpp
index 7a0573acb..cff6491a4 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;