summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/playlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 23d3355708..f1edfe7323 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -367,6 +367,9 @@ static int convert_m3u_name(char* buf, int buf_len, int buf_max, char* temp)
367 */ 367 */
368static void create_control_unlocked(struct playlist_info* playlist) 368static void create_control_unlocked(struct playlist_info* playlist)
369{ 369{
370 if (playlist == &current_playlist && file_exists(PLAYLIST_CONTROL_FILE))
371 rename(PLAYLIST_CONTROL_FILE, PLAYLIST_CONTROL_FILE".old");
372
370 playlist->control_fd = open(playlist->control_filename, 373 playlist->control_fd = open(playlist->control_filename,
371 O_CREAT|O_RDWR|O_TRUNC, 0666); 374 O_CREAT|O_RDWR|O_TRUNC, 0666);
372 375