Bug 451786 - Zero sized images on failed move
Summary: Zero sized images on failed move
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Files (show other bugs)
Version: 6.4.0
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-22 06:35 UTC by ٩(̾●̮̮̃̾•̃̾)۶
Modified: 2022-03-23 05:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ٩(̾●̮̮̃̾•̃̾)۶ 2022-03-22 06:35:12 UTC
SUMMARY

When moving images to different drive disk space empties, there will zero sized images at target disk (combined with possible external datafiles) but actual images stay at source disk and they're not able to be moved to that location after freeing disk space as they appear to be there already. 

This could lead to deletion of images from source location (only working copies) as files may appear to be in two places. 

Haven't tested but suspecting this could occur also if moving is interrupted for some other reason too.
Comment 1 Maik Qualmann 2022-03-22 08:09:58 UTC
Git commit ed2682e23def93f94d645495a28a67c26c782437 by Maik Qualmann.
Committed on 22/03/2022 at 08:09.
Pushed by mqualmann into branch 'qt5-maintenance'.

remove possible existing file if QFile::rename fails
FIXED-IN: 7.7.0

M  +2    -1    NEWS
M  +11   -1    core/libs/threadimageio/engine/dfileoperations.cpp

https://invent.kde.org/graphics/digikam/commit/ed2682e23def93f94d645495a28a67c26c782437
Comment 2 ٩(̾●̮̮̃̾•̃̾)۶ 2022-03-22 15:46:00 UTC
There's also additional issue in this: *Last file* that causes the disk space to end *will be copied partially* and this also may cause user to delete wrong copy from source location and only have this faulty copy of file left as this may go unnoticed. 

Feature should *first check that sufficient space exists* at target location before trying to copy, and possibly have other warnings.
Comment 3 Maik Qualmann 2022-03-22 16:46:40 UTC
If the file is not completely copied, it remains in the source directory. This problem has already been fixed in current digiKam versions.

Maik