Commit 92ff0988 authored by J. Alexander Treuman's avatar J. Alexander Treuman

Fail loading the playlist on errors mid-file. The same code is used for

playlistadd, playlistdelete, etc. and would've caused the playlist to be rewritten only up to the line with the error. git-svn-id: https://svn.musicpd.org/mpd/trunk@6133 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent a2a10100
......@@ -192,6 +192,8 @@ StoredPlaylist *loadStoredPlaylist(const char *utf8path, int fd)
ERROR("\"%s\" too long", temp);
free(temp);
freeStoredPlaylist(sp);
sp = NULL;
goto out;
}
free(temp);
......@@ -211,6 +213,8 @@ StoredPlaylist *loadStoredPlaylist(const char *utf8path, int fd)
s, utf8path);
}
ERROR("line \"%s\" in playlist \"%s\" is too long\n", s, utf8path);
freeStoredPlaylist(sp);
sp = NULL;
goto out;
} else if (s[slength] != '\r')
slength++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment