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
This commit is contained in:
Warren Dukes 2004-06-08 22:43:25 +00:00
parent adc11cb8aa
commit d0968e0140
2 changed files with 3 additions and 2 deletions

View File

@ -12,5 +12,6 @@
#define ACK_ERROR_PLAYLIST_LOAD 9 #define ACK_ERROR_PLAYLIST_LOAD 9
#define ACK_ERROR_UPDATE_ALREADY 10 #define ACK_ERROR_UPDATE_ALREADY 10
#define ACK_ERROR_PLAYER_SYNC 11 #define ACK_ERROR_PLAYER_SYNC 11
#define ACK_ERROR_EXIST 12
#endif #endif

View File

@ -1177,8 +1177,8 @@ int savePlaylist(FILE * fp, char * utf8file) {
free(rfile); free(rfile);
if(0==stat(actualFile,&st)) { if(0==stat(actualFile,&st)) {
myfprintf(fp, "a file or directory already exists with the name" commandError(fp, ACK_ERROR_EXIST, "a file or directory already "
" \"%s\"", utf8file); "exists with the name \"%s\"", utf8file);
return -1; return -1;
} }