branch: externals/dired-preview
commit 537f37574a4214240c7264f8fd2e2f83ee539989
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Make dired-preview--infer-type check for directory before large file
    
    This is because directories may register as "large file" on the Mac
    and result in an error.
    
    Thanks to Sean Devlin for bringing this matter to my attention in
    issue 27: <https://github.com/protesilaos/dired-preview/issues/27>.
---
 dired-preview.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dired-preview.el b/dired-preview.el
index f0562cf78e..6279990f44 100644
--- a/dired-preview.el
+++ b/dired-preview.el
@@ -340,12 +340,12 @@ FILE."
      ((and dired-preview-ignored-extensions-regexp
            (string-match-p dired-preview-ignored-extensions-regexp 
file-nondir))
       (cons 'ignore file))
+     ((file-directory-p file)
+      (cons 'directory file))
      ((dired-preview--file-large-p file)
       (cons 'large file))
      ((string-match-p dired-preview-image-extensions-regexp file-nondir)
       (cons 'image file))
-     ((file-directory-p file)
-      (cons 'directory file))
      (t
       (cons 'text file)))))
 

Reply via email to