aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2005-10-02 15:54:03 +0000
committerStefan Monnier <[email protected]>2005-10-02 15:54:03 +0000
commitedb18c43df867f09ffff9841482900fd9267abd4 (patch)
tree7da487edeb6eba8c2ba21de2fb7c45d3bc653a06 /lisp/net
parent402893bb42d63da7d63b0ada348d7797baf96201 (diff)
(ange-ftp-insert-directory): Fix up the search when `file' is absolute.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/ange-ftp.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 8142e812b7..e3fd69924d 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -4507,10 +4507,11 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
(setq switches (substring switches 0 (match-beginning 0))))
(let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".")
switches nil))
+ (filename (file-name-nondirectory (directory-file-name file)))
(case-fold-search nil))
;; FIXME: This presumes a particular output format, which is
;; basically Unix.
- (if (string-match (concat "^.+[^ ] " (regexp-quote file)
+ (if (string-match (concat "^.+[^ ] " (regexp-quote filename)
"\\( -> .*\\)?[@/*=]?\n") dirlist)
(match-string 0 dirlist)
"")))))))