mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r11159) -Fix (r11155): restore the ability to save in a non existing file
This commit is contained in:
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
Block a user