lftp icon indicating copy to clipboard operation
lftp copied to clipboard

Escaping characters in file name, mirror doesn't follow standard bash escape

Open deze333 opened this issue 1 year ago • 0 comments

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.

deze333 avatar Sep 26 '24 02:09 deze333