]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted)
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 2 Jul 2009 15:27:37 +0000 (15:27 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 2 Jul 2009 15:27:37 +0000 (15:27 +0000)
(tramp-gvfs-connection-mounted-p): Handle changed mount-info
interface.

lisp/ChangeLog
lisp/net/tramp-gvfs.el

index 2efcf47f1eb3d5dd2ed46970c60b8ad6a81a080d..1f20980de5ed38cb6989a066a28eee646ce3248b 100644 (file)
@@ -1,3 +1,9 @@
+2009-07-02  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted)
+       (tramp-gvfs-connection-mounted-p): Handle changed mount-info
+       interface.
+
 2009-07-02  Kenichi Handa  <handa@m17n.org>
 
        * international/mule.el (set-keyboard-coding-system): Force *-unix
index 7ac652eb0e94efb29c9d9c2ea2e115d631a70877..e46727216d6900bf56d4e6510d77755f8f7949f7 100644 (file)
@@ -869,7 +869,10 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"."
 \"org.gtk.vfs.MountTracker.unmounted\" signals."
   (ignore-errors
     (let* ((signal-name (dbus-event-member-name last-input-event))
-          (mount-spec (nth 1 (nth 9 mount-info)))
+          ;; The interface of mount-info has been changed.  We must
+          ;; handle both cases.
+          (last-nth (if (nth 9 mount-info) 9 8))
+          (mount-spec (nth 1 (nth last-nth mount-info)))
           (method (dbus-byte-array-to-string (cadr (assoc "type" mount-spec))))
           (user (dbus-byte-array-to-string (cadr (assoc "user" mount-spec))))
           (domain (dbus-byte-array-to-string
@@ -898,7 +901,7 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"."
          (tramp-set-file-property
           v "/" "fuse-mountpoint"
           (file-name-nondirectory
-           (dbus-byte-array-to-string (nth 8 mount-info)))))))))
+           (dbus-byte-array-to-string (nth (1- last-nth) mount-info)))))))))
 
 (dbus-register-signal
  :session nil tramp-gvfs-path-mounttracker
@@ -920,7 +923,10 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"."
             :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
             tramp-gvfs-interface-mounttracker "listMounts"))
         nil)
-      (let* ((mount-spec (nth 1 (nth 9 elt)))
+      ;; The interface of mount-info has been changed.  We must handle
+      ;; both cases.
+      (let* ((last-nth (if (nth 9 mount-info) 9 8))
+            (mount-spec (nth 1 (nth last-nth elt)))
             (method (dbus-byte-array-to-string
                      (cadr (assoc "type" mount-spec))))
             (user (dbus-byte-array-to-string
@@ -950,7 +956,8 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"."
               (string-equal host (tramp-file-name-host vec)))
          (tramp-set-file-property
           vec "/" "fuse-mountpoint"
-          (file-name-nondirectory (dbus-byte-array-to-string (nth 8 elt))))
+          (file-name-nondirectory
+           (dbus-byte-array-to-string (nth (1- last-nth) elt))))
          (throw 'mounted t))))))
 
 (defun tramp-gvfs-mount-spec (vec)