diff options
author | tron <tron@openttd.org> | 2005-08-01 00:14:22 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-08-01 00:14:22 +0000 |
commit | 984a4c68d6bf2c36b21f023b2114a46a5b65b8e1 (patch) | |
tree | bfb1d0b9f54310693b5e429b53d23b1c07727553 /misc_gui.c | |
parent | 5352ad45822f4b49a03e2586474776b54873048b (diff) | |
download | openttd-984a4c68d6bf2c36b21f023b2114a46a5b65b8e1.tar.xz |
(svn r2775) Deleting a file can fail, display an error message when it happens
Diffstat (limited to 'misc_gui.c')
-rw-r--r-- | misc_gui.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/misc_gui.c b/misc_gui.c index 3f679a5d4..a289c0cfd 100644 --- a/misc_gui.c +++ b/misc_gui.c @@ -1328,7 +1328,9 @@ static void SaveLoadDlgWndProc(Window *w, WindowEvent *e) break; case WE_TIMEOUT: if (HASBIT(w->click_state, 10)) { /* Delete button clicked */ - FiosDelete(WP(w,querystr_d).text.buf); + if (!FiosDelete(WP(w,querystr_d).text.buf)) { + ShowErrorMessage(INVALID_STRING_ID, STR_4008_UNABLE_TO_DELETE_FILE, 0, 0); + } SetWindowDirty(w); BuildFileList(); if (_saveload_mode == SLD_SAVE_GAME) { |