From 94a710fa46511d63ecd211e99d17f76e53497261 Mon Sep 17 00:00:00 2001 From: glx Date: Tue, 25 Sep 2007 14:15:38 +0000 Subject: [PATCH] (svn r11159) -Fix (r11155): restore the ability to save in a non existing file --- src/fileio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileio.cpp b/src/fileio.cpp index 14c6401d3a..5a917d0861 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -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);