Bug 57586 - when trying to save playlist on a readonly filesystem no errors are reported
Summary: when trying to save playlist on a readonly filesystem no errors are reported
Status: RESOLVED FIXED
Alias: None
Product: noatun
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Multimedia Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-22 23:39 UTC by Hans Hvelplund Odborg
Modified: 2003-10-21 14:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch vs. HEAD-14.10.03 to give error when playlist save fails (1.44 KB, patch)
2003-10-17 03:56 UTC, kdozer
Details
Patch vs. HEAD-14.10.03 to give error when playlist save fails (1.44 KB, patch)
2003-10-17 04:27 UTC, kdozer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Hvelplund Odborg 2003-04-22 23:39:18 UTC
Version:           2.2.1 (using KDE 3.1.1)
Compiler:          gcc version 3.2.2
OS:          Linux (i686) release 2.4.20-gentoo-r2

When trying to save the current playlist from within excelent gui on a readonly filesystem, no errors are reported.
This gives the user the impresseion that the playlist has been saved, while infact it has not.

(at least this is the case on my NFS imported file system)
Comment 1 kdozer 2003-05-02 04:49:17 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 } 
 
 
 
Comment 2 kdozer 2003-10-17 03:56:46 UTC
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.
Comment 3 kdozer 2003-10-17 04:27:36 UTC
Created attachment 2798 [details]
Patch vs. HEAD-14.10.03 to give error when playlist save fails

Sorry, slight error in last patch
Comment 4 Stefan Gehn 2003-10-17 10:10:46 UTC
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).
Comment 5 Eray Ozkural 2003-10-21 14:33:18 UTC
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.