[BUG] Moving an image doesn't move the associated .txt metadata.
Describe the bug
If you right-click on an image that has .txt metadata and choose the Move option, the .txt metadata is not moved with the image.
Version: v1.6.1
To Reproduce
- Create a new folder named
example. - Add
example/example.jpgandexample/example.txt. The content shouldn't matter. - Create an
example/destinationfolder. - If you have any existing copies of Diffusion Toolkit, make sure they are in "Portable Mode".
- Run a fresh copy of Diffusion Toolkit.
- Click the X button to dismiss the Welcome splash.
- In Settings, under Diffusion Folders, add the
examplefolder. - Choose "Portable Mode".
- Press Apply.
- Press "Yes" to scan folders now.
- Press the Scan icon on the left to actually do it for real because it doesn't work the first time. 💢
- Open Settings and click "Portable Mode" (and "Apply") again to actually do it for real because it doesn't work the first time. 💢
- In the main grid, right-click the image and select "Move" from the context menu.
-
Choose
example/destinationand press "Select Folder"
Expected behavior
-
example/destinationshould contain bothexample.jpgandexample.txt. -
exampleshould not containexample.txt.
Actual behavior
-
example/destinationcontainsexample.jpg, but notexample.txt. -
examplecontainsexample.txt.
Screenshots
Additional context
Diffusion Toolkit strongly encourages you to manage files from within the app. If you manage files manually from outside the app, the database gets out-of-date and the images appear "Unavailable" inside the app. Messing with .txt metadata can force you to execute a costly "Rebuild metadata."
That, in combination with this bug, leads to a worst-of-both-worlds scenario where you have to manage some files from within the app, but then manually track down their original location anyway to move the metadata by hand. (Assuming you even notice the problem occurred.)
I am using Diffusion Toolkit to manage over 100k images, spread across countless directories. If I moved a batch of a hundred images at a time, it would be daunting to even think about guessing where they all came from so I could fix orphaned metadata one-by-one.
This build artifact should have these changes, if you don't want to wait for an official build:
https://github.com/RupertAvery/DiffusionToolkit/actions/runs/8773444541/artifacts/1433316835
Latest builds will appear in https://github.com/RupertAvery/DiffusionToolkit/actions. Click on the workflow run and scroll down to the artifacts and download DiffusionToolkit.