emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dired-preview 38fab3d419 38/67: Use 'file-regular-p' in


From: ELPA Syncer
Subject: [elpa] externals/dired-preview 38fab3d419 38/67: Use 'file-regular-p' instead of 'file-exists-p'
Date: Sat, 8 Jul 2023 15:57:54 -0400 (EDT)

branch: externals/dired-preview
commit 38fab3d4198e5df2e469ddf3dfd6f0c9945b55ac
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Use 'file-regular-p' instead of 'file-exists-p'
    
    This way we do not try to preview named pipes and sockets.
    
    Thanks to Karthik Chikmagalur for bringing this matter to my
    attention: 
<https://lists.sr.ht/~protesilaos/general-issues/%3C87pm5cnpaf.fsf%40gmail.com%3E>.
---
 dired-preview.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dired-preview.el b/dired-preview.el
index de0417098c..97bbf86545 100644
--- a/dired-preview.el
+++ b/dired-preview.el
@@ -271,7 +271,7 @@ Only do it with the current major mode is Dired."
 
 (defun dired-preview--preview-p (file)
   "Return non-nil if FILE can be previewed."
-  (and (file-exists-p file)
+  (and (file-regular-p file)
        (not (file-directory-p file))
        (not (dired-preview--file-displayed-p file))
        (not (dired-preview--file-ignored-p file))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]