aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-08 22:43:25 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-08 22:43:25 +0000
commitd0968e0140878de812af143b2690a476c69f2364 (patch)
treefeb5e3a1073b5961a18f6eb66632e214b0086f92
parentadc11cb8aaae08debe5939596f8430a511dbcd34 (diff)
downloadmpd-d0968e0140878de812af143b2690a476c69f2364.tar.gz
mpd-d0968e0140878de812af143b2690a476c69f2364.tar.xz
mpd-d0968e0140878de812af143b2690a476c69f2364.zip
fix ack error when attempt to save a playlist that already exists
git-svn-id: https://svn.musicpd.org/mpd/trunk@1402 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/ack.h1
-rw-r--r--src/playlist.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/ack.h b/src/ack.h
index 839452e90..b1ae0d6d5 100644
--- a/src/ack.h
+++ b/src/ack.h
@@ -12,5 +12,6 @@
#define ACK_ERROR_PLAYLIST_LOAD 9
#define ACK_ERROR_UPDATE_ALREADY 10
#define ACK_ERROR_PLAYER_SYNC 11
+#define ACK_ERROR_EXIST 12
#endif
diff --git a/src/playlist.c b/src/playlist.c
index 75943f33d..8d5ad150b 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1177,8 +1177,8 @@ int savePlaylist(FILE * fp, char * utf8file) {
free(rfile);
if(0==stat(actualFile,&st)) {
- myfprintf(fp, "a file or directory already exists with the name"
- " \"%s\"", utf8file);
+ commandError(fp, ACK_ERROR_EXIST, "a file or directory already "
+ "exists with the name \"%s\"", utf8file);
return -1;
}