tweaks: rename a variable, for aptness

master
Benno Schulenberg 2016-05-24 10:23:02 +02:00
parent 1b902d6267
commit bf64386717
1 changed files with 5 additions and 4 deletions

View File

@ -1651,16 +1651,17 @@ bool check_operating_dir(const char *currpath, bool allow_tabcomp)
* messed up and I'm blanket allowing insecure file writing operations'. */ * messed up and I'm blanket allowing insecure file writing operations'. */
int prompt_failed_backupwrite(const char *filename) int prompt_failed_backupwrite(const char *filename)
{ {
static int i; static int response;
static char *prevfile = NULL; /* What was the last file we were static char *prevfile = NULL; /* What was the last file we were
* passed so we don't keep asking * passed so we don't keep asking
* this? Though maybe we should... */ * this? Though maybe we should... */
if (prevfile == NULL || strcmp(filename, prevfile)) { if (prevfile == NULL || strcmp(filename, prevfile)) {
i = do_yesno_prompt(FALSE, response = do_yesno_prompt(FALSE, _("Failed to write backup file; "
_("Failed to write backup file, continue saving? (Say N if unsure) ")); "continue saving? (Say N if unsure.) "));
prevfile = mallocstrcpy(prevfile, filename); prevfile = mallocstrcpy(prevfile, filename);
} }
return i;
return response;
} }
void init_backup_dir(void) void init_backup_dir(void)