about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2025-06-30 14:35:08 +0100
committerArun Isaac2025-06-30 15:36:48 +0100
commitf9a4628c94893937ea8f393b3b060acbaa888c61 (patch)
tree6b0faf7c8a6d4b1e6ab9d5627656e546bda7a395
parent7d8d75ce860663ae11b8ee4a947d8cb09ec14296 (diff)
downloadennum-f9a4628c94893937ea8f393b3b060acbaa888c61.tar.gz
ennum-f9a4628c94893937ea8f393b3b060acbaa888c61.tar.lz
ennum-f9a4628c94893937ea8f393b3b060acbaa888c61.zip
Return absolute paths even when input path is not absolute.
* ennum.el (ennum-directory-files): Return absolute paths even if
input path is not an absolute path.
-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