forked from mirror/OpenTTD
(svn r26058) -Fix: handle the return value of a number of functions better
This commit is contained in:
@@ -106,7 +106,9 @@ bool IniFile::SaveToDisk(const char *filename)
|
||||
shfopt.pTo = tfilename;
|
||||
SHFileOperation(&shfopt);
|
||||
#else
|
||||
rename(file_new, filename);
|
||||
if (rename(file_new, filename) < 0) {
|
||||
DEBUG(misc, 0, "Renaming %s to %s failed; configuration not saved", file_new, filename);
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user