Bug 400712 - file modification timestamp is updated when images are moved to collection on removable media
Summary: file modification timestamp is updated when images are moved to collection on...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Media (other bugs)
Version First Reported In: 6.0.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-05 18:29 UTC by Daniel Laidig
Modified: 2018-11-06 17:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Laidig 2018-11-05 18:29:27 UTC
SUMMARY
When moving images from a local collection to a collection on removable media, the modification time (mtime) of the file is changed to the current time. This does not happen when moving files within a collection or between two local collections.

STEPS TO REPRODUCE
1. Create a local collection and a collection on a removable media.
2. Add images to the local collection.
3. Move some images from the local collection to the collection on the removable media.

OBSERVED RESULT
The timestamp of the moved file is set to the current time.

EXPECTED RESULT
The timestamp should not change when moving files.

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
I have observed this behavior with 5.9.0 and actually lost data (images from old digital cameras without metadata where the mtime was the only hint of the recording date). Just now, I reproduced it with the 6.0.0-beta2 appimage on a different machine.

The "update file timestamp when files are modified" option does not seem to influence the described behavior. Not sure if it is relevant, but I have configured digikam to only write metadata to sidecar files.
Comment 1 Maik Qualmann 2018-11-06 17:39:25 UTC
Git commit 1718ddd7a0044cbc60d846dff4d58a343d5fb7da by Maik Qualmann.
Committed on 06/11/2018 at 17:38.
Pushed by mqualmann into branch 'master'.

copy or move file and keep the source file modification time
FIXED-IN: 6.0.0

M  +2    -2    NEWS
M  +2    -5    core/libs/iojobs/iojob.cpp
M  +56   -7    core/libs/threadimageio/engine/dfileoperations.cpp
M  +10   -0    core/libs/threadimageio/engine/dfileoperations.h

https://commits.kde.org/digikam/1718ddd7a0044cbc60d846dff4d58a343d5fb7da