Bug 220204 - HUB : digiKam could warn when writing metadata to pictures fails
Summary: HUB : digiKam could warn when writing metadata to pictures fails
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Hub (show other bugs)
Version: 6.0.0
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
: 256784 391891 461402 463059 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-27 00:47 UTC by Vlado Plaga
Modified: 2022-12-15 11:06 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-1142-0.html (1.35 KB, text/html)
2019-03-03 06:54 UTC, Chandra Kant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vlado Plaga 2009-12-27 00:47:09 UTC
Version:           1.0.0 (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

When the user wants digiKam to save picture meta data in the picture files it could warn the user if writing to a picture file fails. One reason for failure could be a read-only file.

Of course there should only be one warning per user interaction, not hundreds (at least if the warning comes in a "click ok dialogue"), even if hundreds of files should be changed at once.
Comment 1 caulier.gilles 2010-06-07 09:59:46 UTC
Can you take a look with digiKam 1.2.0 ?

Gilles Caulier
Comment 2 Vlado Plaga 2010-06-08 14:04:52 UTC
The bug is still valid in digiKam 1.2.0.

To reproduce: take two pictures, make one of the read-only ("chmod -w"). Then in digiKam change their rating, comment, whatever. Notice how only the writable file is really modified (if your setting is to save metadata in pictures at all), without digiKam giving you a warning. Changes to the read-only file are only saved in digiKam's database.
Comment 3 caulier.gilles 2011-12-17 09:32:41 UTC
Vlado,

This file still valid using digiKam 2.x serie ?

Gilles Caulier
Comment 4 Vlado Plaga 2011-12-21 20:43:41 UTC
Yes, digiKam 2.1.1 still does not say anything when "Metadata Writing Mode" is set to "Write to image only" and writing to the image is not possible, because it is write protected.

There now is the new option "Write to XMP sidecar for read-only image only" and that seems to work as expected: in my test an XMP sidecar file was only created for the image that was not writable, when I tried to change metadata for two images.

By the way: I got some strange output on the console during these tests:

digikam(18574)/digikam (core) Digikam::CollectionScanner::scanAlbum: Folder does not exist or is not readable:  "/daten/digicam/nijmegen/2011-10-08__12-25-40.jpg18574" 
digikam(18574)/digikam (core) Digikam::CollectionScanner::scanAlbum: Folder does not exist or is not readable:  "/daten/digicam/nijmegen/2011-10-08__12-25-40.jpg"

There were more path names ending in "18574" mentioned for other images.
Comment 5 Marcel Wiesweg 2012-09-29 11:44:56 UTC
We still dont have that implemented. Would need some sort of unobtrusive warning.
Comment 6 julien.t43+kde 2013-02-21 19:10:42 UTC
I would say digikam *should* warn user
Anyway, an easier way to *reduce* the problem is providing a log file of metadata writing and log all failure with files and attempted changes.
Comment 7 Chandra Kant 2019-03-02 17:55:26 UTC
This bug is resolved in the latest version of Digicam 6.0.0
Comment 8 caulier.gilles 2019-03-02 18:11:23 UTC
How it can be solved as no code have been committed in this file ?

Maik, did you confirm this ?

Gilles Caulier
Comment 9 Maik Qualmann 2019-03-02 21:54:17 UTC
No, there is no change to the code here and no message recognizable to the normal user.

Maik
Comment 10 caulier.gilles 2019-03-02 22:03:59 UTC
So, why Chandra Kant can judge that this entry can be close !!!

Gilles Caulier
Comment 11 Chandra Kant 2019-03-03 04:31:06 UTC
I am using digikam version 6.0.0 and when i  used metadata hub it worked fine.I think that this problem was with the previous version.
Comment 12 Chandra Kant 2019-03-03 06:54:23 UTC
Created attachment 118500 [details]
attachment-1142-0.html

I am trying to contribute to that issue.

On Sun, Mar 3, 2019 at 3:24 AM Maik Qualmann <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=220204
>
> Maik Qualmann <metzpinguin@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |metzpinguin@gmail.com
>
> --- Comment #9 from Maik Qualmann <metzpinguin@gmail.com> ---
> No, there is no change to the code here and no message recognizable to the
> normal user.
>
> Maik
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 13 Vlado Plaga 2019-03-03 12:23:42 UTC
As the original reporter I can confirm that this problem still exists with digiKam 6.0 (under Arch Linux ARM). I chose "Image tags", "Captions and title", and "Rating" under "Write this information to metadata" (Configure / Metadata / Behaviour), then tried to change the title of a read-only file. In a writeable directory I get the following output on the terminal I started digiKam from:

digikam.metaengine: File "IMG_20190209_112357.jpg" is read only. Metadata not written.
digikam.metaengine: Will write XMP sidecar for file "IMG_20190209_112357.jpg"
digikam.metaengine: wroteEXIF:  true
...
digikam.metaengine: Metadata for file "IMG_20190209_112357.jpg" written to XMP sidecar.

When the directory also is read-only, the following is printed:

digikam.metaengine: File "IMG_20190209_112357.jpg" is read only. Metadata not written.
digikam.metaengine: Will write XMP sidecar for file "IMG_20190209_112357.jpg"
digikam.metaengine: Cannot save metadata to XMP sidecar using Exiv2   (Error # 10 :  /daten/digicam/2019/test_ro3/IMG_20190209_112357.jpg.xmp: Failed to open file (w+b): Permission denied (errno = 13)

There is no output for a "normal" user, who is not watching his terminal. I think this can be a severe problem, and would like to see a notification. Maybe the operating system's notification system could be used, like for when a folder refresh (triggered by a right-click in the album tree) is completed?
Comment 14 Vlado Plaga 2019-03-03 12:26:24 UTC
*** Bug 256784 has been marked as a duplicate of this bug. ***
Comment 15 Chandra Kant 2019-03-04 10:52:14 UTC
Yes,I agree Vlado Plaga that a notification must be shown regarding this issue for a normal user.I think that this issue arises because of read-only file.
Comment 16 caulier.gilles 2020-08-04 16:43:54 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Best Regards

Gilles Caulier
Comment 17 Maik Qualmann 2021-03-11 07:00:35 UTC
*** Bug 434246 has been marked as a duplicate of this bug. ***
Comment 18 Maik Qualmann 2022-11-04 08:56:00 UTC
*** Bug 461402 has been marked as a duplicate of this bug. ***
Comment 19 Maik Qualmann 2022-12-15 11:06:27 UTC
*** Bug 391891 has been marked as a duplicate of this bug. ***
Comment 20 Maik Qualmann 2022-12-15 11:06:46 UTC
*** Bug 463059 has been marked as a duplicate of this bug. ***