Hi Michael,

i just tried the new (Gnome 3.18) google-drive backend using tramp-gvfs.

It fails to parse "gvfs-info" output because of my de_DE.utf8 locale.
Example output is:

Attribute:
  standard::type: 2
  standard::is-symlink: FALSE
  standard::icon: folder

instead of the expected:

attributes:
  standard::type: 2
  standard::is-symlink: FALSE
  standard::icon: folder

IMO tramp-gvfs should use C-Locale in order to avoid this problems (patch
enclosed). Any objections against applying this?

Regards

Jürgen
From da9c0826819435f38f7aee6d4fcd64d4e01db5b3 Mon Sep 17 00:00:00 2001
From: Juergen Hoetzel <[email protected]>
Date: Mon, 12 Oct 2015 18:00:00 +0200
Subject: [PATCH] * tramp-gvfs.el: (tramp-gvfs-send-command): Suppress
 localized settings in order to proper parse gfvs output.

---
 lisp/ChangeLog     |  5 +++++
 lisp/tramp-gvfs.el | 10 ++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b657a48..305a79e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-12  Jürgen Hötzel  <[email protected]>
+
+	* tramp-gvfs.el: (tramp-gvfs-send-command): Suppress localized
+	settings in order to proper parse gfvs output.
+
 2015-10-12  Michael Albinus  <[email protected]>
 
 	* tramp.el (tramp-completion-function-alist): Fix docstring.
diff --git a/lisp/tramp-gvfs.el b/lisp/tramp-gvfs.el
index fcfd9f2..d8888e1 100644
--- a/lisp/tramp-gvfs.el
+++ b/lisp/tramp-gvfs.el
@@ -1628,10 +1628,12 @@ connection if a previous connection has died for some reason."
   "Send the COMMAND with its ARGS to connection VEC.
 COMMAND is usually a command from the gvfs-* utilities.
 `call-process' is applied, and it returns t if the return code is zero."
-  (with-current-buffer (tramp-get-connection-buffer vec)
-    (tramp-gvfs-maybe-open-connection vec)
-    (erase-buffer)
-    (zerop (apply 'tramp-call-process vec command nil t nil args))))
+  (let ((process-environment
+	 (append '("LANG=C" "LANGUAGE=C" "LC_ALL=C") process-environment)))
+    (with-current-buffer (tramp-get-connection-buffer vec)
+     (tramp-gvfs-maybe-open-connection vec)
+     (erase-buffer)
+     (zerop (apply 'tramp-call-process vec command nil t nil args)))))
 
 
 ;; D-Bus BLUEZ functions.
-- 
2.6.1

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

Reply via email to