src/fileio.cpp
changeset 7625 36b37d05937f
parent 7624 febff7f99ea1
child 7628 b723a5a8065f
equal deleted inserted replaced
7624:febff7f99ea1 7625:36b37d05937f
   295 	} else {
   295 	} else {
   296 		snprintf(buf, lengthof(buf), "%s%s%s", _searchpaths[sp], _subdirs[subdir], filename);
   296 		snprintf(buf, lengthof(buf), "%s%s%s", _searchpaths[sp], _subdirs[subdir], filename);
   297 	}
   297 	}
   298 
   298 
   299 #if defined(WIN32)
   299 #if defined(WIN32)
   300 	if (GetFileAttributes(OTTD2FS(buf)) == -1) return NULL;
   300 	if (GetFileAttributes(OTTD2FS(buf)) == INVALID_FILE_ATTRIBUTES) return NULL;
   301 #endif
   301 #endif
   302 
   302 
   303 	f = fopen(buf, mode);
   303 	f = fopen(buf, mode);
   304 #if !defined(WIN32)
   304 #if !defined(WIN32)
   305 	if (f == NULL) {
   305 	if (f == NULL) {