jamerst/AutoTag

TV Episodes with "?" in title fail to rename

urbster1 opened this issue · 6 comments

Using Linux Mint 20.1 with zsh, TV episodes with ? in the title error when renaming as follows:

    Error: Failed to rename file - Invalid argument

I should also note that ? is not valid for filenames in Linux Mint. I'm not sure whether that's an EXT4 restriction or not, but that character is not allowed.

I haven't been able to reproduce this so far. The Lost S02E21 episode is titled "?" and that is able to rename just fine.

Please could you provide the following so I can try to reproduce it:

  • the details of the episode(s) you're not able to rename
  • the command you're running to invoke AutoTag

I'm able to name files with a question mark just fine on an ext4 filesystem, that's definitely not a restriction. I'm not using Mint, so I'll try running it in a live USB later, but I don't see any reason why Mint would change that. You're definitely writing to an ext4 filesystem and not NTFS?

That's okay, it's an annoying issue, I encountered it myself before I moved my content over to a proper filesystem.

It's also a bit tricky to fix unfortunately. You can check the filesystem that a file is under, but under Linux it can only report it as a FUSE filesystem for an NTFS partition. There doesn't seem to be a way to easily check the actual underlying filesystem.

An NTFS partition is probably the only thing that will commonly be mounted in FUSE, so it's probably fairly safe to assume that any drive reported as FUSE is actually an NTFS partition and characters such as "?" and ":" should be removed.

I've added a new option in v3.0.4, --windows-safe. That should remove any characters from file names that are invalid on Windows or NTFS when AutoTag is run under Linux.