Project

General

Profile

Bug #12650

Maintain state during move and copy of multiple files.

Added by August Schwerdfeger 6 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Lighttable
Start date:
04/07/2019
Due date:
% Done:

0%

Estimated time:
Affected Version:
git master branch
System:
all
bitness:
64-bit
hardware architecture:
amd64/x86

Description

When selecting and moving several versions of the same image, spurious error messages are raised on every version moved after the first, since the call to the move function on the first version automatically moves all.

Also, the copy function exhibits the following incorrect behavior when the given destination file already exists:

When copying, e.g., image A/Image.jpg into directory B, if B/Image.jpg already exists, the copy function will not overwrite B/Image.jpg, but will create a new version of A/Image.jpg in the database in filmroll B (and a new sidecar B/Image_01.jpg.xmp) erroneously linked to the potentially unrelated B/Image.jpg.

Since the move and copy functions operate over only one image at a time, it is impossible, within them, to distinguish between the first version of an image moved/copied and subsequent versions. Some form of external state must be maintained that allows implementation of the following behavior:

  • Call the move function only on the first version of an image encountered, and not on subsequent versions.
  • When calling the copy function on the first version of an image encountered, always raise an error if the destination file already exists. Call on subsequent versions only if the copy on the first version succeeded, and do not raise any errors if the destination file already exists in that case.

Also available in: Atom PDF

Go to top