[Pkg-mc-devel] mc/fish/ssh cannot traverse directories with spaces

Marc MERLIN marc at merlins.org
Wed Dec 10 18:05:21 UTC 2008


I've been looking at this bug, which has been pretty crippling for me:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488497

Short story is if I have

/var/ftp/dir name/file

when I enter that remote directory
/#ftp:hostname/dir name/
I see can can download file

when I enter it with
/#sh:hostname/var/ftp/dir name/
I get 'Cannot change directory'
and if I try to copy that directory, I get no error, it copies the directory
but not its files.

This used to work in the ancient mc_4.5.55-1.2_i386.deb
I checked my current 2:4.6.2~git20080311-4
and it does have ls -lQ in the mc binary:

>   fish: Local read failed, sending zeros  #LIST "/%s"
> if ls -1 "/%s" >/dev/null 2>&1 ;
> then
> ls -lQLan "/%s" 2>/dev/null | grep '^[^cbt]' | (
> while read p l u g s m d y n; do
> echo "P$p $u.$g
> S$s
> d$m $d $y
> :$n
> "|sed 's#\"##g'
> done
> )
> ls -lQan "/%s" 2>/dev/null | grep '^[cb]' | (
> while read p l u g a i m d y n; do

I haven't quite pinned down what changed between  mc_4.5.55-1.2
and the current 4.6.2 git and that broke

> ls -lLa "/%s" | grep '^[^cbt]' | (
> while read p x u g s m d y n; do
> echo "P$p $u.$g
> S$s
> d$m $d $y
> :$n
> "
> done
> )
> ls -lLa "/%s" | grep '^[cb]' | (
> while read p x u g a i m d y n; do

I tried removing -Q from the 2 ls lines in mc 4.6.2, but that did not help:
space in ftp fish works, space in ssh fish does not work.

Any other ideas?

Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/



More information about the Pkg-mc-devel mailing list