lftp
lftp copied to clipboard
Escaping characters in file name, mirror doesn't follow standard bash escape
Example filename:
Filename - 1234 'Red' [456] (ABC)
Escaped for Bash:
Filename\ -\ 1234\ \'Red\'\ \[456\]\ \(ABC\)
But mirror command doesn't unescape all escaped characters:
mirror: Access failed: No such file (/Filename - 1234 'Red' \[456\] \(ABC\))
The only way to make mirror work is to skip escaping brackets, like so:
Filename\ -\ 1234\ \'Red\'\ [456]\ (ABC)
But that seem to be a non-standard escape scheme.
Also, some characters like " even if escaped just disappear from the filename when parsed by mirror.