Fix T54106: Save blend ignores 'check_existing'

This commit is contained in:
Campbell Barton 2018-02-27 13:33:59 +11:00
parent b5f0e8e1a1
commit 50b95211bf
1 changed files with 3 additions and 1 deletions

View File

@ -2144,11 +2144,13 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *U
char path[FILE_MAX];
RNA_string_get(op->ptr, "filepath", path);
if (BLI_exists(path)) {
if (RNA_boolean_get(op->ptr, "check_existing") && BLI_exists(path)) {
ret = WM_operator_confirm_message_ex(C, op, IFACE_("Save Over?"), ICON_QUESTION, path);
}
else {
ret = wm_save_as_mainfile_exec(C, op);
/* Without this there is no feedback the file was saved. */
BKE_reportf(op->reports, RPT_INFO, "Saved \"%s\"", BLI_path_basename(path));
}
}
else {