`purge_nonexistent_images.bat` removes existing files · Issue #20915 · darktable-org/darktable · GitHub
Skip to content

purge_nonexistent_images.bat removes existing files #20915

Closed

Description

@mishavoloshchuk

Is there an existing issue for this?

  • I checked and did not find my issue in the already reported ones

Describe the bug

When darktable's library contains images located in folders with Cyrillic (or other non-ASCII) names, running the script with --purge removes those images from the library even though they exist on disk and display correctly in Darktable. After the script runs, valid photos disappear from the library.

Steps to reproduce

  1. I created the following images:

    • D:\Darktable Test\Latin folder name example\Latin file name example.JPG

    • D:\Darktable Test\Latin folder name example\Приклад назви файлу кирилицею.JPG

    • D:\Darktable Test\Latin folder name example\Some missing image.JPG

    • D:\Darktable Test\Приклад назви папки кирилицею\Latin file name example.JPG

    • D:\Darktable Test\Приклад назви папки кирилицею\Приклад назви файлу кирилицею.JPG

    • D:\Darktable Test\Приклад назви папки кирилицею\Some missing image.JPG

  2. Added all those images to my Darktable library.

Image
  1. Deleted the D:\Darktable Test\Latin folder name example\Some missing image.JPG and the D:\Darktable Test\Приклад назви папки кирилицею\Some missing image.JPG and regenerated thumbnails to make some non-existing images.
Image
  1. Close the Darktable.
  2. Run the purge_nonexistent_images.bat script by opening command line in darktable\share\darktable\tools folder and running purge_nonexistent_images.bat -p
Image Image

(to get this screenshot I had to screen-record, because after finishing - the cmd window immediately disappears, but we're here not for that)
6. Open the Darktable and we can see that only one image left, which is the only image that didn't have cyrillic symbols in the path.
Image

Expected behavior

Only images whose files are genuinely absent from disk should be removed from the library. Images in Cyrillic-named folders that exist on disk must not be touched.

Logfile | Screenshot | Screencast

Image Image Image

Commit

No response

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

5.4.1

What OS are you using?

Windows

What is the version of your OS?

Windows 10 Pro 22H2 19045.7184

Describe your system

CPU: Intel Xeon X3440
RAM: 16Gb

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

Nvidia Geforce GTX 660, Driver version 456.71

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

  • The reproduce above was done on a clear database
  • A "regenerate thumbnails" lua script was used

Activity

  1. github-actions commented on Jul 2, 2026

    @github-actions

    This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions