[BUG] White-space in folder names causes command to fail
danielkrajnik opened this issue · 2 comments
danielkrajnik commented
Checks
- I have read the troubleshooting section and still think this is a bug.
Describe the bug you encountered:
I'm trying to run fd . -e eml -x mu extract --save-all {} --target-dir {.}
and it fails whenever a path has a space in it:
error: target 'Sent' is not a writable directory
Describe what you expected to happen:
It should surround path names with quotes to protect white spaces in folder names.
What version of fd
are you using?
fd 9.0.0
Which operating system / distribution are you on?
Linux 6.6.9-arch1-1 x86_64
LSB Version: n/a
Distributor ID: EndeavourOS
Description: EndeavourOS Linux
Release: rolling
Codename: rolling
tavianator commented
I will double check, but I'm betting this is a bug in mu
rather than fd
danielkrajnik commented
Sorry, you are right - this doesn't work in mu: mu extract --save-all "Sent Items/240.eml" --target-dir Sent\ Items/240
neither with escaped space nor surrounded with quotes
error: target 'Sent' is not a writable directory
On the upside I could quickly rename all these directories with fd-find and rename :)
fd " " -x rename " " "-"
Sorry to bother and thank you for the tip