[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp (2.0.28); dired can't reach root dir
From: |
Kai Großjohann |
Subject: |
Re: tramp (2.0.28); dired can't reach root dir |
Date: |
Mon, 03 Feb 2003 19:25:30 +0100 |
User-agent: |
Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 (i686-pc-linux-gnu) |
It seems there's a lot of voodoo going on in that function. What do
people think about this one?
(defun tramp-handle-directory-file-name (directory)
"Like `directory-file-name' for tramp files."
;; If path component of filename is "/", leave it unchanged.
;; Otherwise, remove any trailing slash from path component.
;; Method, host, etc, are unchanged.
(with-parsed-tramp-file-name directory nil
(if (and (eq (aref path (1- (length path))) ?/)
(not (string= path "/")))
(substring directory 0 -1)
directory)))
I wish it could be further simplified. But `directory-file-name'
cannot be told to just use the Unix behavior.
--
A turnip curses Elvis