mirror of https://github.com/OpenTTD/OpenTTD
(svn r11159) -Fix (r11155): restore the ability to save in a non existing file
parent
e61f197dba
commit
94a710fa46
|
@ -297,7 +297,7 @@ FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath sp, Subd
|
|||
}
|
||||
|
||||
#if defined(WIN32)
|
||||
if (GetFileAttributes(OTTD2FS(buf)) == INVALID_FILE_ATTRIBUTES) return NULL;
|
||||
if (mode[0] == 'r' && GetFileAttributes(OTTD2FS(buf)) == INVALID_FILE_ATTRIBUTES) return NULL;
|
||||
#endif
|
||||
|
||||
f = fopen(buf, mode);
|
||||
|
|
Loading…
Reference in New Issue