Alexey Lebedeff <[email protected]> writes:

> When listing remote directory, tramp issues command like this:
>
> cd /home/binarin/; echo "("; (/bin/ls -a | xargs /usr/bin/stat -c '("%n" 
> ("%N") %h "%U" "%G" %X.0 %Y.0 %Z.0 %s.0 "%A" t %i.0 -1)'); echo ")" 
> 2>/dev/null; echo tramp_exit_status $?
>
> For filenames containing spaces, this command tries to stat not
> filename as a whole, but each separated by spaces part of filename,
> resulting in many errors like this:
>
> /usr/bin/stat: cannot stat `...`
>
> For filenames that begins with '--' it breaks completly, because stat
> complains and produces no output at all:
>
> /usr/bin/stat: unrecognized option '--test'
>
> Command for listing need to be replaced with something in spirit of following:
>
> (find . -maxdepth 1 -printf '%f\0'; perl -e 'print "..\0"')  | xargs -0 
> /usr/bin/stat -c '("%n" ("%N") %h "%U" "%G" %X.0 %Y.0 %Z.0 %s.0 "%A" t %i.0 
> -1)' --

I've committed a patch to Tramp CVS, which uses sed for quoting the file
name. This might be more portable than expecting perl on the remote
host.

Thanks for reporting, and best regards, Michael.


_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to