]> git.eshelyaron.com Git - emacs.git/commitdiff
(ange-ftp-insert-directory): Fix up the search when `file' is absolute.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 2 Oct 2005 15:54:03 +0000 (15:54 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 2 Oct 2005 15:54:03 +0000 (15:54 +0000)
lisp/ChangeLog
lisp/net/ange-ftp.el

index 63b44276b16603e3f1b552c9cdfffc80ef0df939..9842b405165865297f7bdf7be05c817ac669535c 100644 (file)
@@ -2,6 +2,8 @@
 
        * net/ange-ftp.el (ange-ftp-insert-directory): Undo unintended part
        in last change.
+       (ange-ftp-insert-directory): Fix up the search for the case where
+       `file' is absolute.
 
 2005-10-02  Romain Francoise  <romain@orebokech.com>
 
index 8142e812b748bbeb3251c899e550eff6a4996420..e3fd69924d4781369de1a294984e7b8cc919b682 100644 (file)
@@ -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)
            "")))))))