I’ve read posts about Anki’s case sensitivity so I’m reporting this bug here.
Suppose you have two decks with a0.jpg and A0.JPG each. When you import the a0.jpg deck then the A0.JPG deck, a0.jpg will be replaced with A0.JPG without any notice. The actual image within the card will be displayed as A0.JPG too.
If you add a third deck with a0.jpg, Anki will add hash to the filename from this point despite not having the actual a0.jpg inside the media folder.
I had this issue after importing some decks with images, which contained files like 0.jpg and 0.JPG in different decks.
Bonus sync bug: Add a forth deck with A0.JPG. Close the program to sync it, then open it again. Delete all four decks. Close the program and you’ll get a sync error briefly flashing before it crashes.
I made the 4 decks experimenting with this problem, you can get it here:
Version info:
Version 25.09.2 (3890e12c)
Python 3.13.5 Qt 6.9.1 Chromium 122
Windows 11 25H2 26200.7171
As far as I know on windows a.txt and a.TXT is the same file (they replace each other). Linux treats it as separate files, meaning those two can coexist. A message about the replacement might still be good, though.
Yes, Windows treat them as the same file. However the two files content can be different in this case so the previous card gets corrupt with the wrong image.
I can reproduce this. That’s an interesting issue. Looking briefly at the importing code, I think the issue is that Anki is looking at the files in a case-sensitive manner and deciding not to add the hash suffix. Then, it overwrites whatever existing file is on case-insensitive systems like Windows.