]> git.eshelyaron.com Git - emacs.git/commitdiff
(insert-directory): Use expanded file name to find handler.
authorRichard M. Stallman <rms@gnu.org>
Sat, 28 May 1994 12:33:08 +0000 (12:33 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 28 May 1994 12:33:08 +0000 (12:33 +0000)
lisp/files.el

index 746e24e9747a1f13ee3e12207b7fc0b7aec0e1aa..a01c13465ecd1a28fcff2e605b75fb41e955dc99 100644 (file)
@@ -2024,7 +2024,9 @@ switches do not contain `d', so that a full listing is expected.
 This works by running a directory listing program
 whose name is in the variable `insert-directory-program'.
 If WILDCARD, it also runs the shell specified by `shell-file-name'."
-  (let ((handler (find-file-name-handler file 'insert-directory)))
+  ;; We need the directory in order to find the right handler.
+  (let ((handler (find-file-name-handler (expand-file-name file)
+                                        'insert-directory)))
     (if handler
        (funcall handler 'insert-directory file switches
                 wildcard full-directory-p)