aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-03-31 00:18:38 +0000
committerRichard M. Stallman1995-03-31 00:18:38 +0000
commitcb79b372cf6187a7f15a47fac7e77a76aee4ceda (patch)
tree7b4f3502a91527ff963d3b895036e4dccdf11d30
parentf609ef57b2342154a071f3bfea3c3aaa3079f48a (diff)
downloademacs-cb79b372cf6187a7f15a47fac7e77a76aee4ceda.tar.gz
emacs-cb79b372cf6187a7f15a47fac7e77a76aee4ceda.zip
(dired-add-entry): If ange-ftp inserted the file's absolute name, fix that.
-rw-r--r--lisp/dired-aux.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index c537c2e458f..9785b6cffb6 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -749,6 +749,7 @@ a prefix arg lets you edit the `ls' switches used for the new listing."
749 ;; Entry is always for files, even if they happen to also be directories 749 ;; Entry is always for files, even if they happen to also be directories
750 (let ((opoint (point)) 750 (let ((opoint (point))
751 (cur-dir (dired-current-directory)) 751 (cur-dir (dired-current-directory))
752 (orig-file-name filename)
752 (directory (file-name-directory filename)) 753 (directory (file-name-directory filename))
753 reason) 754 reason)
754 (setq filename (file-name-nondirectory filename) 755 (setq filename (file-name-nondirectory filename)
@@ -783,6 +784,20 @@ a prefix arg lets you edit the `ls' switches used for the new listing."
783 (let ((default-directory directory)) 784 (let ((default-directory directory))
784 (insert-directory filename 785 (insert-directory filename
785 (concat dired-actual-switches "d"))) 786 (concat dired-actual-switches "d")))
787 ;; Compensate for a bug in ange-ftp.
788 ;; It inserts the file's absolute name, rather than
789 ;; the relative one. That may be hard to fix since it
790 ;; is probably controlled by something in ftp.
791 (goto-char opoint)
792 (let ((inserted-name (dired-get-filename 'no-dir)))
793 (if (file-name-directory inserted-name)
794 (progn
795 (end-of-line)
796 (delete-char (- (length inserted-name)))
797 (insert filename)
798 (forward-char 1))
799 (forward-line 1)))
800 ;; Give each line a text property recording info about it.
786 (dired-insert-set-properties opoint (point)) 801 (dired-insert-set-properties opoint (point))
787 (forward-line -1) 802 (forward-line -1)
788 (if dired-after-readin-hook;; the subdir-alist is not affected... 803 (if dired-after-readin-hook;; the subdir-alist is not affected...