import folder twice creates multiple entries
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 test.py
from shutil import copyfile
for i in range(10):
dst = os.path.splitext("DSC04028.ARW") + "_" + str(i+1) + ".ARW"
print("copyfile(" + src + ", " + dst + ")")
#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.