Bug 236577

Summary: Using two time save as, overwrites original file.
Product: [Applications] gwenview Reporter: Jakub Kuzniar <jakub.kuzniar>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: mklapetek, monikakrug, nsandschn, walch.martin
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jakub Kuzniar 2010-05-06 14:53:03 UTC
Version:            (using KDE 4.4.2)
OS:                Linux
Installed from:    openSUSE RPMs

When I modify file "A.jpg" in Gwenview for e.g. using "Mirror" operation, and try to save file using "Save As" then file is saved correctly as "B.jpg". The information "You are now viewing the new document..." is displayed. In the window title "B.jpg" is displayed. Next  I try to modify this picture using some other operation like "crop". Everything is ok, and when I save file using "Save" no error appears. In the window title  still "B.jpg" is shown. When I close gwenview and open A.jpg, I see picture which should be saved as B. So original file was overwritten !

In the console I can see information:

gwenview(21023) KFileItemPrivate::init: "A.jpg" does not exist anymore                                                                                
gwenview(21023) KFileItemPrivate::init: "A.jpg" does not exist 
anymore                                                                                
gwenview(21023) Gwenview::MainWindow::goToUrl: KUrl("file:///usr/local/Biblioteka/Grafika/Zdjecia/B.jpg")

Program exhibits different behaviour when after saving A.jpg as B.jpg i try to zoom it. Then it hangs and after some time crash with information displayed on the console:

gwenview(20219) KFileItemPrivate::init: "A.jpg" does not exist anymore                                                                                
gwenview(20219) KFileItemPrivate::init: "A.jpg" does not exist anymore                                                                                
gwenview(20219) Gwenview::MainWindow::goToUrl: KUrl("file:///usr/local/Biblioteka/Grafika/Zdjecia/B.jpg")                                          
Segmentation fault

I thing this is very sever bug. I lost a few original "A.jpg" files. I could reproduce it on two opensuse11.2 + kde4.4.2 installations on two separate computers.
Comment 1 nsandschn 2010-05-07 23:18:23 UTC
I can confirm the first part of the bug with KDE 4.4.3 in Debian sid. Gwenview indeed overwrites the first file instead of the second!
However, I don't see any hangs or crashes when zooming the second picture.
Comment 2 Aurelien Gateau 2010-11-12 17:08:21 UTC
*** Bug 255760 has been marked as a duplicate of this bug. ***
Comment 3 Aurelien Gateau 2010-11-12 22:20:19 UTC
SVN commit 1196246 by gateau:

Make sure the saved-as url is correctly selected.

BUG: 236577

 M  +23 -12    mainwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1196246
Comment 4 Aurelien Gateau 2010-11-12 22:26:27 UTC
*** Bug 256337 has been marked as a duplicate of this bug. ***
Comment 5 Aurelien Gateau 2010-11-12 22:31:24 UTC
*** Bug 252694 has been marked as a duplicate of this bug. ***
Comment 6 Aurelien Gateau 2010-11-12 22:32:13 UTC
SVN commit 1196254 by gateau:

Make sure the saved-as url is correctly selected.

BUG: 236577

 M  +23 -12    mainwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1196254