[Top][All Lists]

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

tramp-handle-*-attributes-with-stat user/group quoting patch

From: Wagemans, Peter
Subject: tramp-handle-*-attributes-with-stat user/group quoting patch
Date: Tue, 8 Aug 2006 18:13:06 +0200

In tramp-2.1.6, under ntemacs, I needed to add quotes to the
user and group elements in the functions


Without the added quotes, emacs gets into trouble while making
directory listings with ls-lisp-format which does

    (format (if (stringp uid) " %-8s" " %-8d") uid)))
    (format (if (stringp gid) " %-8s" " %-8d") gid))))

[Indentation reduced.]

Unquoted user and group names are not strings and ls-lisp-format tries
to format them as numbers instead.


Peter Wagemans

--- tramp.el.old_200608081151   2006-05-28 19:53:43.000000000 +0200
+++ tramp.el    2006-08-08 12:00:40.598147200 +0200
@@ -2151,8 +2151,8 @@
     "%s -c '((\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s \"%%A\" t %%i -1)' %s"
     (tramp-get-remote-stat vec)
-    (if (eq id-format 'integer) "%u" "%U")
-    (if (eq id-format 'integer) "%g" "%G")
+    (if (eq id-format 'integer) "%u" "\"%U\"")
+    (if (eq id-format 'integer) "%g" "\"%G\"")
     (tramp-shell-quote-argument localname))))
 (defun tramp-handle-set-visited-file-modtime (&optional time-list)
@@ -2473,8 +2473,8 @@
     (tramp-shell-quote-argument localname)
     (tramp-get-ls-command vec)
     (tramp-get-remote-stat vec)
-    (if (eq id-format 'integer) "%u" "%U")
-    (if (eq id-format 'integer) "%g" "%G"))))
+    (if (eq id-format 'integer) "%u" "\"%U\"")
+    (if (eq id-format 'integer) "%g" "\"%G\""))))
 ;; This function should return "foo/" for directories and "bar" for
 ;; files.

reply via email to

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