Bug #11437

import folder twice creates multiple entries

Added by David Schaefer over 2 years ago. Updated over 2 years ago.

Closed: won't fix
Target version:
Start date:
Due date:
% Done:


Affected Version:
git master branch
hardware architecture:


Hi, I was trying to check for case #11422. For this I wrote a script that copies a raw file such that I end up having 2000 files. After importing the directory I had 2000 images. After triggering that script again and such overwriting all existing copies by new ones and then importing the directory to dt I ended up having 2000 or 2001 images (cant remember exactly), and the first image had 2000 versions (a group with 2K items).
I wanted to reproduce that and started with 10 copies (due to time and memory) and found a similar issue:

- use script below in a directory with 1 raw file (modify script accordingly) > you end up having copies of it
import the directory
- wait a minute
- execute the script again
- import the directory
- now the first image contains 2 versions (in my original observation I had 2K versions). What I expect is that the image is detected as already imported and such ignored.

$ cat
import os.path
from shutil import copyfile

for i in range(10):
dst = os.path.splitext("DSC04028.ARW")[0] + "_" + str(i+1) + ".ARW"
print("copyfile(" + src + ", " + dst + ")")
copyfile(src, dst)


#1 Updated by Tobias Ellinghaus over 2 years ago

  • Status changed from New to Closed: won't fix

Yes, that's just how dt works: _number at the end of the name, followed by the file extension, is used as the XMP filename of duplicates. I don't think that we want to change that.

#2 Updated by David Schaefer over 2 years ago

Please read my report again. That behavior is inconsistent (only 1 of 10 files is affected).
Also when you have 2 raw images and repeat the process you only will have the strange behaviour for one image.

#3 Updated by David Schaefer over 2 years ago

Ah, maybe I misunderstood: So you say that my pattern for a copy matches the one dt uses for versions and such when I wanted to create a new file for dt it looked like another version? If so I will change my image_$i.ARW pattern to something else and retry.

#4 Updated by David Schaefer over 2 years ago

tested again. All good. Thank you.

#5 Updated by Roman Lebedev over 2 years ago

  • Target version set to 2.4.0

Also available in: Atom PDF