(svn r15664) -Fix [FS#2716]: as always windows needs special handling when strings are involved
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user