mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
GTK save_prefs: fix a wrongly sourced error report.
After a failed rename(), we should find out what went wrong by looking in errno itself, not in wctx->error which reported a problem in the previous step.
This commit is contained in:
2
gtk.c
2
gtk.c
@ -3079,7 +3079,7 @@ static char *save_prefs(frontend *fe)
|
||||
}
|
||||
|
||||
if (rename(tmp_path, file_path) < 0) {
|
||||
const char *os_err = strerror(wctx->error);
|
||||
const char *os_err = strerror(errno);
|
||||
sprintf(err = snewn(256 + strlen(tmp_path) + strlen(file_path) +
|
||||
strlen(os_err), char),
|
||||
"Unable to save preferences:\n"
|
||||
|
Reference in New Issue
Block a user