Summary: | when trying to save playlist on a readonly filesystem no errors are reported | ||
---|---|---|---|
Product: | noatun | Reporter: | Hans Hvelplund Odborg <odborg> |
Component: | general | Assignee: | Multimedia Developers <kde-multimedia> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Patch vs. HEAD-14.10.03 to give error when playlist save fails
Patch vs. HEAD-14.10.03 to give error when playlist save fails |
Description
Hans Hvelplund Odborg
2003-04-22 23:39:18 UTC
I gues this bug is for the split playlist (not the excellent gui) I can confirm this. - there doesn't seem to be any error reporting done when saving.- noatun/modules/splitplaylist/view.cpp : 833 void View::save() 834 { 835 if (mPlaylistFile.isMalformed()) { saveAs(); return; } 836 saveToURL(mPlaylistFile); 837 setModified(false); 838 } 839 840 void View::saveAs() 841 { 842 KURL u=KFileDialog::getSaveURL(0, "*.xml splitplaylistdata *.pls *.m3u\n*", this, i18n("Save Playlist")); 843 if (u.isMalformed()) return; 844 mPlaylistFile = u; 845 save(); 846 } Created attachment 2797 [details]
Patch vs. HEAD-14.10.03 to give error when playlist save fails
ok, well since no-one else has got around to fixing this, attached is a patch
to fix the problem by giving an error when a file can't be saved.
The patch is against HEAD, but applies cleanly to KDE_3_1_BRANCH too.
Please test and apply.If you don't have time to do this right now, please
change the status to GRAVE as this bug can cause data loss. Quietly failing
saving and then setting isModified to false means that when the user quits
they lose all changes to their playlist without any warning.
Created attachment 2798 [details]
Patch vs. HEAD-14.10.03 to give error when playlist save fails
Sorry, slight error in last patch
Just by looking at the patch it seems to be ok, I'll have a closer look soon (can't test it right now on my laptop running kde 3.1.x). You can't save stuff on a readonly filesystem any more it seems. I have such a filesystem but I can't go into it in a save dialog. but you can browse write-protected dirs and select a filename which fails later. patch applied. should think of a better way to circumvent this in the future. there should be code in the save dialogue that interacts with the user, as well. |