Include symlinks in custom file listings, even if they are dangling
When listing files, it's not relevant whether the file is readable or whether a symbolic link points to a non-existing file. What matters is that the file itself exists, either as a file or as a symbolic link. This is relevant when using `git annex find` to list files matching some search criteria.
This commit is contained in:
parent
a3fd8f77b2
commit
106f286285
|
@ -354,8 +354,8 @@ output, separated by \\n, when called with
|
|||
(list-of-files (cl-remove-if-not
|
||||
(lambda (entry)
|
||||
(and (not (string-empty-p entry))
|
||||
(file-exists-p entry)
|
||||
(file-readable-p entry)))
|
||||
(or (file-exists-p entry)
|
||||
(file-symlink-p entry))))
|
||||
(split-string (shell-command-to-string command)
|
||||
"\n"))))
|
||||
(dired (cons "Command output" list-of-files))))
|
||||
|
|
Loading…
Reference in New Issue