(svn r11159) -Fix (r11155): restore the ability to save in a non existing file

This commit is contained in:
glx 2007-09-25 14:15:38 +00:00
parent e61f197dba
commit 94a710fa46

View File

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