diff options
author | glx <glx@openttd.org> | 2009-03-10 14:54:46 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2009-03-10 14:54:46 +0000 |
commit | f45e3b306850405d5f32fc184cc3dfd3a31ed6cc (patch) | |
tree | 3a357a71c612d4710e1d2e603af3e2bbda7bc3cf | |
parent | d6f2a65323d5fe4e0a83e305ac203eb5f3af4790 (diff) | |
download | openttd-f45e3b306850405d5f32fc184cc3dfd3a31ed6cc.tar.xz |
(svn r15664) -Fix [FS#2716]: as always windows needs special handling when strings are involved
-rw-r--r-- | src/fios.cpp | 5 |
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; |