mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
gnus-utils.el (gnus-recursive-directory-files): Unify hard or symbolic links (bug#18063)
This commit is contained in:
parent
da8b9ab0d8
commit
c448c6241f
2 changed files with 23 additions and 10 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2014-07-22 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-utils.el (gnus-recursive-directory-files):
|
||||
Unify hard or symbolic links (bug#18063).
|
||||
|
||||
2013-07-17 Albert Krewinkel <albert@zeitkraut.de>
|
||||
|
||||
* gnus-msg.el (gnus-configure-posting-style):
|
||||
|
|
|
|||
|
|
@ -1910,17 +1910,25 @@ Sizes are in pixels."
|
|||
image)))
|
||||
image)))
|
||||
|
||||
(eval-when-compile (require 'gmm-utils))
|
||||
(defun gnus-recursive-directory-files (dir)
|
||||
"Return all regular files below DIR."
|
||||
(let (files)
|
||||
(dolist (file (directory-files dir t))
|
||||
(when (and (not (member (file-name-nondirectory file) '("." "..")))
|
||||
(file-readable-p file))
|
||||
(cond
|
||||
((file-regular-p file)
|
||||
(push file files))
|
||||
((file-directory-p file)
|
||||
(setq files (append (gnus-recursive-directory-files file) files))))))
|
||||
"Return all regular files below DIR.
|
||||
The first found will be returned if a file has hard or symbolic links."
|
||||
(let (files attr attrs)
|
||||
(gmm-labels
|
||||
((fn (directory)
|
||||
(dolist (file (directory-files directory t))
|
||||
(setq attr (file-attributes (file-truename file)))
|
||||
(when (and (not (member attr attrs))
|
||||
(not (member (file-name-nondirectory file)
|
||||
'("." "..")))
|
||||
(file-readable-p file))
|
||||
(push attr attrs)
|
||||
(cond ((file-regular-p file)
|
||||
(push file files))
|
||||
((file-directory-p file)
|
||||
(fn file)))))))
|
||||
(fn dir))
|
||||
files))
|
||||
|
||||
(defun gnus-list-memq-of-list (elements list)
|
||||
|
|
|
|||
Loading…
Reference in a new issue