beets-alternatives
beets-alternatives copied to clipboard
Failure on case insensitive filesystem when case changes
I see this error when using this plugin on a case-insensitive filesystem (fat32):
Error: file exists while renaming /media/NIKON D3300/Music/classical/Henri Dutilleux; Cyril Ciabaud, Kasia Tomczak-Feltrin, Mathieu Petit, Romain Robine, Orchestre National de Lille, Jean‐Claude Casadesus/Symphony no. 1 _ Métaboles _ Les Citations/01 Symphony no. 1_ I. Passacaille_ Andante.opus to /media/NIKON D3300/Music/classical/Henri Dutilleux; Cyril Ciabaud, Kasia Tomczak-Feltrin, Mathieu Petit, Romain Robine, Orchestre national de Lille, Jean‐Claude Casadesus/Symphony no. 1 _ Métaboles _ Les Citations/01 Symphony no. 1_ I. Passacaille_ Andante.opus
The N in Orchestre National de Lille changed to lowercase, and that seems to be what's causing this problem.
I guess we would need to rename through a temporary file to avoid this. Anyone aware of a way to detect this issue such that we don't need to use a temp file unconditionally?
Not entirely sure, I usually try to avoid case insensitive filesystems. I did find these two issues, though:
- https://github.com/beetbox/beets/issues/1496
- https://github.com/beetbox/beets/pull/1586
The second one uses beets.util.is_filesystem_case_sensitive which might work.