tramp-devel
[Top][All Lists]
Advanced

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

tramp (2.1.15); problems with filenames containing spaces or beginning w


From: Alexey Lebedeff
Subject: tramp (2.1.15); problems with filenames containing spaces or beginning with '--'
Date: Thu, 21 May 2009 13:37:32 +0400
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.0.93 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO)

Emacs  : GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600)
 of 2009-05-15 on DEMANDRED
Package: tramp (2.1.15)

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)' --





reply via email to

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