mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-16 17:15:05 +01:00
(svn r15664) -Fix [FS#2716]: as always windows needs special handling when strings are involved
This commit is contained in:
parent
d6f2a65323
commit
f45e3b3068
@ -230,8 +230,13 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FiosItem *fios = _fios_items.Append();
|
FiosItem *fios = _fios_items.Append();
|
||||||
|
#ifdef WIN32
|
||||||
|
struct _stat sb;
|
||||||
|
if (_tstat(OTTD2FS(filename), &sb) == 0) {
|
||||||
|
#else
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
if (stat(filename, &sb) == 0) {
|
if (stat(filename, &sb) == 0) {
|
||||||
|
#endif
|
||||||
fios->mtime = sb.st_mtime;
|
fios->mtime = sb.st_mtime;
|
||||||
} else {
|
} else {
|
||||||
fios->mtime = 0;
|
fios->mtime = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user