(svn r11159) -Fix (r11155): restore the ability to save in a non existing file
authorglx
Tue, 25 Sep 2007 14:15:38 +0000
changeset 7628 b723a5a8065f
parent 7627 9a215ee83593
child 7629 711bbbc7a171
(svn r11159) -Fix (r11155): restore the ability to save in a non existing file
src/fileio.cpp
--- a/src/fileio.cpp	Mon Sep 24 20:56:33 2007 +0000
+++ b/src/fileio.cpp	Tue Sep 25 14:15:38 2007 +0000
@@ -297,7 +297,7 @@
 	}
 
 #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);