FS#8656 - Error saving non-current playlist file

Attached to Project: Rockbox
Opened by Steve (TheBashar) - Wednesday, 27 February 2008, 18:22 GMT
Last edited by Jonathan Gordon (jdgordon) - Thursday, 21 July 2011, 06:41 GMT
Task Type Bugs
Category Playlists
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I was trying to remove a track from a non-current (not playing) playlist using the playlist viewer. I can remove the track but when I return to the playlist, the change is not persisted. While in the viewer I try forcing a save to the same file name as was loaded and I get the following error message: "error accessing playlist file".

Because of this problem, the only way I remove tracks from a non-current playlist is through "Open with" text_editor. And that is pretty inconvenient.
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Thursday, 21 July 2011, 06:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  in r30184
Comment by Marc Guay (Marc_Guay) - Thursday, 03 April 2008, 16:00 GMT
Confirmed with Sansa e200 & r16929.
Comment by Jonathan Gordon (jdgordon) - Wednesday, 20 July 2011, 14:58 GMT
This is still an open and confirmed bug. The problem is we dont necessarily load the whole playlist into ram so we cant easily write over the same file.
playlist.c line 3388 is the culprit (playlist_save()).
Possible fix is to try to grab the plugin buffer here which should be enough for most playlists.
Comment by Michael Sevakis (MikeS) - Thursday, 21 July 2011, 00:33 GMT
Why not save a temp file with the new playlist, delete the original and then rename the temp file the same name as the original?
Comment by Jonathan Gordon (jdgordon) - Thursday, 21 July 2011, 00:35 GMT
or that :)