]> git.eshelyaron.com Git - emacs.git/commitdiff
; Instrument tramp.el
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 9 May 2016 17:55:49 +0000 (19:55 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 9 May 2016 17:55:49 +0000 (19:55 +0200)
lisp/net/tramp.el

index 118da5788589aea79dcecbbebe1b92b7927786b4..57a6594880ea4f0ab6c2a998bdfd086a6a37651b 100644 (file)
@@ -2847,6 +2847,20 @@ User is always nil."
   (let ((v (tramp-dissect-file-name file t)))
     ;; Run the command on the localname portion only unless we are in
     ;; completion mode.
+    (when (getenv "NIX_STORE")
+      (message
+       "tramp-handle-file-name-as-directory file %s tramp-completion-mode-p %s result %s"
+       file (tramp-completion-mode-p)
+       (tramp-make-tramp-file-name
+        (tramp-file-name-method v)
+        (tramp-file-name-user v)
+        (tramp-file-name-host v)
+        (if (and (tramp-completion-mode-p)
+                 (zerop (length (tramp-file-name-localname v))))
+            ""
+          (tramp-run-real-handler
+           'file-name-as-directory (list (or (tramp-file-name-localname v) ""))))
+        (tramp-file-name-hop v))))
     (tramp-make-tramp-file-name
      (tramp-file-name-method v)
      (tramp-file-name-user v)