[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.1.15); problems with filenames containing spaces or beginni

From: Michael Albinus
Subject: Re: tramp (2.1.15); problems with filenames containing spaces or beginning with '--'
Date: Sat, 13 Jun 2009 12:50:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

Alexey Lebedeff <address@hidden> 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

Thanks for reporting, and best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]