From 422ea20cefd4eb9fa95d283f50049f45dbf10e84 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sun, 4 Jun 2023 00:43:56 +0200 Subject: Warn before overwriting another playlist on disk When saving a playlist to an existing file on disk, warn user, unless the playlist's file name remains unchanged. Change-Id: I10d82667de5fadb5323be4f981bea9263849f07a --- apps/onplay.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'apps/onplay.c') diff --git a/apps/onplay.c b/apps/onplay.c index 341da62840..a9cbc64598 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -948,13 +948,6 @@ static bool poll_cancel_action(const char *path) return ACTION_STD_CANCEL == get_action(CONTEXT_STD, TIMEOUT_NOBLOCK); } -static int confirm_overwrite(void) -{ - static const char *lines[] = { ID2P(LANG_REALLY_OVERWRITE) }; - static const struct text_message message = { lines, 1 }; - return gui_syncyesno_run(&message, NULL, NULL); -} - static bool check_new_name(const char *basename) { /* at least prevent escapes out of the base directory from keyboard- @@ -1426,7 +1419,7 @@ static int clipboard_paste(void) case RELATE_DIFFERENT: if (file_exists(target.path)) { /* If user chooses not to overwrite, cancel */ - if (confirm_overwrite() == YESNO_NO) { + if (confirm_overwrite_yesno() == YESNO_NO) { rc = OPRC_NOOVERWRT; break; } -- cgit v1.2.3