summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist_catalog.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c
index be992645ee..f91f8c07bb 100644
--- a/apps/playlist_catalog.c
+++ b/apps/playlist_catalog.c
@@ -411,6 +411,7 @@ static int remove_extension(char* path)
411bool catalog_pick_new_playlist_name(char *pl_name, size_t buf_size, 411bool catalog_pick_new_playlist_name(char *pl_name, size_t buf_size,
412 const char* curr_pl_name) 412 const char* curr_pl_name)
413{ 413{
414 char bmark_file[MAX_PATH + 7];
414 bool do_save = false; 415 bool do_save = false;
415 while (!do_save && !remove_extension(pl_name) && 416 while (!do_save && !remove_extension(pl_name) &&
416 !kbd_input(pl_name, buf_size - 7, NULL)) 417 !kbd_input(pl_name, buf_size - 7, NULL))
@@ -421,7 +422,16 @@ bool catalog_pick_new_playlist_name(char *pl_name, size_t buf_size,
421 /* warn before overwriting existing (different) playlist */ 422 /* warn before overwriting existing (different) playlist */
422 if ((!curr_pl_name || strcmp(curr_pl_name, pl_name)) && 423 if ((!curr_pl_name || strcmp(curr_pl_name, pl_name)) &&
423 file_exists(pl_name)) 424 file_exists(pl_name))
425 {
424 do_save = confirm_overwrite_yesno() == YESNO_YES; 426 do_save = confirm_overwrite_yesno() == YESNO_YES;
427
428 if (do_save) /* delete bookmark file unrelated to new playlist */
429 {
430 snprintf(bmark_file, sizeof(bmark_file), "%s.bmark", pl_name);
431 if (file_exists(bmark_file))
432 remove(bmark_file);
433 }
434 }
425 } 435 }
426 return do_save; 436 return do_save;
427} 437}