Bug 408687

Summary: "Failed to update file timestamp" despite date being changed successfully in Adjust Date and Time tool
Product: [Applications] digikam Reporter: MarcP <iwannaberich>
Component: Plugin-Generic-TimeAdjustAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: iwannaberich, metzpinguin
Priority: NOR    
Version First Reported In: 6.2.0   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.2.0
Sentry Crash Report:

Description MarcP 2019-06-14 13:32:34 UTC
SUMMARY

I frequently use the Adjust Date and Time for adding a date to pictures without metadata.

I have observed that, sometimes, I correct the date, save it to the metadata, and when I click on "Apply" I get the "Failed to update file timestamp" error. 

However, when inspecting the metadata, the new date is there. When looking at the console, I can confirm that the metadata was saved with a message like: "Digikam::MetaEngine::save: Metadata for file "Picture 20190221_191536.jpg" written to file."

Moreover, after closing the adjust date and time tool, the date is not refreshed in the miniature/thumbnail view in digikam, and I need to manually reread the metadata from the file so the changes are shown.

I have recorded a short clip showing this behavior: https://imgur.com/a/pQUgO5O


STEPS TO REPRODUCE
1. Select a picture or group of pictures
2. Open the Adjust Date and Time tool
3. Change the date using any option (e.g. filename timestamp, or directly entering the date)
4. Click "Apply"

OBSERVED RESULT
"Failed to update file timestamp" appears next to each picture. The metadata is not refreshed in digikam.

EXPECTED RESULT
Indicate that the metadata has been written successfully and refresh that metadata in digikam.

SOFTWARE/OS VERSIONS
digikam-6.2.0-git-20190612T102714-qtwebkit-x86-64.appdata in Ubuntu 18.04
Comment 1 Maik Qualmann 2019-06-14 14:27:02 UTC
The error states that the modification date of the file could not be changed. This is a low level C function, if this fails on your drive, you should check or repair your (network) drive. Of course, I can ignore the error and update the item, but it does not change the fact that something is wrong with your computer.

Maik
Comment 2 MarcP 2019-06-14 14:34:56 UTC
Ok. My library is mounted in a sshfs network share. I'll check out what can be happening here.
Comment 3 Maik Qualmann 2019-06-14 21:07:31 UTC
Git commit a244a6a4e1c90424aa97e46b94ac047365de9287 by Maik Qualmann.
Committed on 14/06/2019 at 21:06.
Pushed by mqualmann into branch 'master'.

ignore filestamp update error and refresh item
FIXED-IN: 6.2.0

M  +2    -1    NEWS
M  +1    -1    core/dplugins/generic/metadata/timeadjust/timeadjusttask.cpp

https://invent.kde.org/kde/digikam/commit/a244a6a4e1c90424aa97e46b94ac047365de9287