Version: (using KDE Devel) Installed from: Compiled sources Problem: There is no check whether the filename returned from RenameDlg is already existing when "Rename" was selected. Reproduce: 1. Create some files in your home dir: $ touch print.ps; touch print_1.ps; touch print_2.ps 2. Open a file in Kate and reach for the printing dialog 3. Select "print to file": default is ~/print.ps 4. Click "Ok" 5. Smart printer dialog detects there already is such a file and calls for the RenameDlg. 6. Click "Suggest" button and get a new name proposed: "print_1.ps" 7. Click "Rename" which is now activated. 8. Lucky you. Get your existing "print_1.ps" overwritten, without any warning.
Created attachment 3252 [details] This works for me.
Due, this works for me was meant for the patch. And as there is a possible loss of data (overwritten files) the bug should be marked grave surely. Please, anyone to review that really simple patch?
The patch looks fine. Why didn't you apply it already?
Because I felt unsure if I understood the code around correctly. I sent the patch to kde-devel (okay, should perhaps have been kde-core-devel) and kde-print for review but got no reaction. So I put it here to rest until finally someone comes along. What should have I done else? :)
*** This bug has been marked as a duplicate of 59796 ***
The patch is OK, however a more generic solution has been implemented at KIO::RenameDlg level (see revision 1.71 of kdelibs/kio/kio/renamedlg.cpp). This should solve the problem. I'll close the bug. (sorry for not taking your previous posts into consideration, I remember it but it looks like I lost it and unfortunately forgot about it) Michael. > ------- Additional Comments From friedrich w h kossebau de > 2004-02-14 12:05 ------- > Because I felt unsure if I understood the code around > correctly. I sent the > patch to kde-devel (okay, should perhaps have been > kde-core-devel) and > kde-print for review but got no reaction. So I put it here to > rest until > finally someone comes along. > > What should have I done else? :) >
> ------- Additional Comments From goffioul imec be 2004-02-16 10:36 ------- > The patch is OK, however a more generic solution has been implemented > at KIO::RenameDlg level (see revision 1.71 of > kdelibs/kio/kio/renamedlg.cpp). This should solve the problem. I'll close > the bug. The fix at KIO::RenameDlg level fixes only half of the problem. Change my example to a manually inserted new name. This one should be checked for existance, too, until "Overwrite" was explicitly choosen. So IMO the patch still should be applied. And pleased backported. Friedrich
Then please commit it, if possible. Michael. > The fix at KIO::RenameDlg level fixes only half of the > problem. Change my > example to a manually inserted new name. This one should be > checked for > existance, too, until "Overwrite" was explicitly choosen. > > So IMO the patch still should be applied. And pleased backported. > > Friedrich >
> ------- Additional Comments From goffioul imec be 2004-02-16 13:02 ------- > Then please commit it, if possible. Sorry, could you or someone else do it, my cvs copy is broken ATM and a recompile takes a day on my 233 MHz computer (and is not planned for the next few weeks, due to exams) :/ Friedrich PS: And after having once again a look at the code of KPrintDialog::checkOutputFile() I think that most of this functionality should be in KIO itself anyway (and needs a way to prevent file name race conditions). But I haven't the time to care for.
Closing old Resolved status bug.