beets-alternatives icon indicating copy to clipboard operation
beets-alternatives copied to clipboard

Failure on case insensitive filesystem when case changes

Open aereaux opened this issue 4 years ago • 2 comments

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.

aereaux avatar Sep 19 '21 23:09 aereaux

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?

wisp3rwind avatar Oct 03 '21 11:10 wisp3rwind

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.

aereaux avatar Oct 03 '21 14:10 aereaux