about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ennum.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/ennum.el b/ennum.el
index a271fa6..57c2705 100644
--- a/ennum.el
+++ b/ennum.el
@@ -437,7 +437,14 @@ INCLUDE-DIRECTORIES is non-nil, include directories in the
 output."
   (let* ((directory (or directory default-directory))
          (files (directory-files-recursively
-                 directory (rx anything) include-directories)))
+                 ;; `directory-files-recursively' returns absolute
+                 ;; paths only if `directory' is itself an absolute
+                 ;; path.
+                 (if full
+                     (expand-file-name directory)
+                   directory)
+                 (rx anything)
+                 include-directories)))
     (if full
         files
       (seq-map (apply-partially 'string-remove-prefix