emacs-devel
[Top][All Lists]
Advanced

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

file-chase-links limit


From: Jens Petersen
Subject: file-chase-links limit
Date: 09 Apr 2003 16:33:02 +0900
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Portable Code)

I just tried to build cvs head and ran into problems with
byte-compiling "eshell/esh-module.el".  Investigating
further I found the problem seems to be caused by the
evaluation of `(max nil 100)' in `file-chase-links' and I
noticed the following recent change:

- - -
revision 1.648
date: 2003/04/09 01:34:38;  author: rms;  state: Exp;  lines: +11 -6
(file-chase-links): New arg LIMIT.
After that many iterations, just return what we've got.
- - -

I'm not sure what the intended behaviour was when LIMIT is
nil, but I guess something like the following change is
needed - at least with this the tree seems to build ok for me.
(The latter change should take care of the case when LIMIT
is not an integer.)

Jens


Index: files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.648
diff -u -r1.648 files.el
--- files.el    9 Apr 2003 01:34:38 -0000       1.648
+++ files.el    9 Apr 2003 07:29:34 -0000
@@ -746,11 +746,11 @@
 it means chase no more than that many links and then stop."
   (let (tem (newname filename)
            (count 0)
-           (max (max limit 100)))
+           (max (if limit (max limit 100) 100)))
     (while (and (or (null limit) (< count limit))
                (setq tem (file-symlink-p newname)))
       (save-match-data
-       (if (= count max)
+       (if (>= count max)
            (error "Apparent cycle of symbolic links for %s" filename))
        ;; In the context of a link, `//' doesn't mean what Emacs thinks.
        (while (string-match "//+" tem)




reply via email to

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