(svn r15664) -Fix [FS#2716]: as always windows needs special handling when strings are involved

This commit is contained in:
glx 2009-03-10 14:54:46 +00:00
parent d6f2a65323
commit f45e3b3068
1 changed files with 5 additions and 0 deletions

View File

@ -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;