Bug 206272 - Failed to overwrite original file
Summary: Failed to overwrite original file
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: ImageEditor-Save (show other bugs)
Version: 1.0.0
Platform: Ubuntu Unspecified
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 19:32 UTC by Gandalf Lechner
Modified: 2022-02-03 03:58 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gandalf Lechner 2009-09-04 19:32:45 UTC
Version:           1.0.0-beta5 svn (using KDE 4.3.0)
Installed from:    Ubuntu Packages

Sometimes the following happens: I open an image from within digikam with the image editor and edit it with some of the available tools. But when I try to save the edited file, I get an error message 

"Failed to overwrite original file"

and cannot save the changes. The files seem to be fine; for example, I _can_ edit and save with other programs. 

The bug appears rather seldom for me and at the moment, I cannot tell when it appears and when not. Maybe (I have to check that) it appears only with images imported from the camera (instead of using a card reader).

In the console, I don't see any additional error messages explaining what's going on. 

I will attach one of the many files I am having this problem with, so maybe someone can check if the problem appears on others systems as well, i.e. if it is related to the file or to digikam itself.
Comment 1 Gandalf Lechner 2009-09-04 19:40:39 UTC
An image affected by the bug can be found here:

http://www.theorie.physik.uni-goettingen.de/~lechner/IMG_4923.JPG
Comment 2 caulier.gilles 2009-09-14 12:13:41 UTC
SVN commit 1023241 by cgilles:

patch from Alexey Morozov to fix encoding file path to use with KDE::rename() with image editor when a file is saved with unicode characters.
Andi, Marcel, this problem can exist too in other place everywhere. We nned to check this point indeep before to release 1.0.0
It's possible that B.K.O files are fixed with this commit.
CCBUGS: 206272
CCMAIL: morozov@gmail.com


 M  +3 -2      editorwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1023241
Comment 3 Marcel Wiesweg 2009-09-21 19:32:03 UTC
Gandalf, may it be that this happened to you when working in certain directories (containing non-latin1 characters?)
Comment 4 Gandalf Lechner 2009-09-23 10:00:44 UTC
As far as I remember, it also happened in directories with only usual characters in their names. Not entirely sure, though.
Comment 5 Joachim 2009-09-23 13:26:42 UTC
I have the same symptom, but it seems not in the same circumstances.  The problem never occurred until a few days ago and now it is systematic, with the same collection, on the same disc.  There also is the additional symptom of problem aborted saving when saving under a different name to a different location (to /home).  A different folder in my collection has "é" characters, but I (also) have the same problem with files in other folders.

Joachim

> Not long ago, my Digikam (on Jaunty with KDE and Gnome) worked just fine
> (great).
>
> Now it has the following problem: whenever I want to save a modified
> picture, I receive a error message "can't overwrite the original file" (I
> get it in French, but that's what it says.)  This even occurs when I try to
> "save as" to a different location on a different disc.  In this case,
> Digikam writes a .tmp file with a technical name to the specified location.
>
> This looks like a an access permission issue.  So re-checked that I still
> have all permissions to my photo collection, which is located on a second
> internal ext3 single volume disc.  I do have create and delete permissions
> according to the properties and I can modify the actual folders and files
> without problem.  But maybe there is a twist to this that I ignore ?
>
> The problem seems to occur since I have installed video software on the
> computer (only from the repositories).  But why ?  I have un-installed some
> of them (those that can be uninstalled without breaking too many
> dependencies), but the problem persists.  Could they be responsible ?
Comment 6 caulier.gilles 2009-09-23 13:33:02 UTC
Gandalf, Joachim,

Do you use current implementation from svn, where i have applied a patch... with commit #1023241

Marcel,

I have experienced this dysfunction too in the past. I never use accentuated char in file path/name.

I suspect a badly initialized variable in saving context container...

http://websvn.kde.org/trunk/extragear/graphics/digikam/utilities/imageeditor/editor/savingcontextcontainer.h?view=log

Gilles
Comment 7 Gandalf Lechner 2009-09-23 13:45:43 UTC
I always use a fresh svn version. However, the problem appears in my case only sometimes, and I cannot tell if the last time I experienced it your patch was already implemented. I'll write here if the problem appears again.

Regarding file/path names, I sometimes use German umlaute ä,ö,ü, but I think the last time I experienced the problem it was in a folder without these in its name. I frequently use blanks/spaces in my folder names - could this be a problem?
Comment 8 Joachim 2009-09-23 18:57:37 UTC
I followed the advice and changed the name of the disc which had a "è" and the name of the folder, which had two "é" and all other nice letters in the environment that I could find.  I also rebuilt the database.  I have not changed anything to the system (DigiKam 1.0.0 beta 3 KDE 4.3.1)   And I don't have the problem any more.  :-)  (so far, so good, I still don't understand why it did work perfectly some days ago, with accents in the file paths)  Now I can use my favorite software again !  Thanks
Comment 9 Arnaud Guiton 2009-10-11 09:46:53 UTC
Hi everyone,

I sometimes use "é, è, ø, æ, å" in my directory names and also experience this bug. Everything has always been fine (in digiKam and with other tools) until 2 or 3 weeks ago.

Gilles, does 1.0.0-beta5 (released this week) contains commit #1023241?
I am currently using Debian 1.0.0~beta4-2 and wondered if upgrading to -beta5 could solve it.

If you need more debug information, just tell me how I can help... I'm eager to have this solved! :-)


Cheers, 
-- 
Arnaud
Comment 10 caulier.gilles 2009-10-11 09:50:34 UTC
Arnaud,

Yes commit #1023241 is included in 1.0.0-beta5

Gilles
Comment 11 Arnaud Guiton 2009-10-11 10:04:20 UTC
Good news: I upgraded to 1.0.0-beta5 and it now seems OK.

Of course, I have tested only 5 minutes but "Failed to overwrite original file" errors I saw yesterday with -beta4 have not reappeared.

Thanks!
Comment 12 caulier.gilles 2009-10-11 10:10:02 UTC
Arnaud,

Please test indeep during few days and report again if all is fine. Like this i can close this file definitively (i hope (:=))))...

Gilles
Comment 13 caulier.gilles 2009-10-11 10:12:19 UTC
Gandalf, Joachim, 

Please test with 1.0.0-beta5 and report. Thanks in advance

Gilles Caulier
Comment 14 Arnaud Guiton 2009-10-21 20:11:02 UTC
Hi everyone,

It has been more than a week now, and I have not seen this issue with 1.0.0-beta5.

Gilles: I think you can close this bug!


Cheers,
-- 
Arnaud