xiph / flac

Free Lossless Audio Codec
https://xiph.org/flac/
GNU Free Documentation License v1.3
1.58k stars 278 forks source link

On Windows the flac command line has problems in dealing with files with long filename/path #687

Open emalizia opened 3 months ago

emalizia commented 3 months ago

Although the issue #528 was closed, I've individuated another scenario in which the flac command line has problems on Windows when it has to deal with files with long filename/path.

In the comments of issue #528, people were referring to the error encountered when trying to write to a file with long path name. I've found out that this can be circumvented by using the "\\?\" trick (see https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation) with the "-o" option in the flac command line.

However, the flac command line has issues while opening files with long path names, and this apparently cannot be solved by using the same "\\?\" trick: the flac tool simply returns that the source file does not exist if the prefix "\\?\" is used.