Mercurial > emacs
changeset 50526:b79ec75049f6
(file-chase-links): Fix previous change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 09 Apr 2003 19:06:04 +0000 |
parents | 6a83115d6dae |
children | cb27de31f54d |
files | lisp/files.el |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Wed Apr 09 17:45:20 2003 +0000 +++ b/lisp/files.el Wed Apr 09 19:06:04 2003 +0000 @@ -745,12 +745,11 @@ If the optional argument LIMIT is a number, it means chase no more than that many links and then stop." (let (tem (newname filename) - (count 0) - (max (max limit 100))) + (count 0)) (while (and (or (null limit) (< count limit)) (setq tem (file-symlink-p newname))) (save-match-data - (if (= count max) + (if (and (null limit) (= count 100)) (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) @@ -769,7 +768,7 @@ ;; Now find the parent of that dir. (setq newname (file-name-directory newname))) (setq newname (expand-file-name tem (file-name-directory newname))) - (setq count (1- count)))) + (setq count (1+ count)))) newname)) (defun recode-file-name (file coding new-coding &optional ok-if-already-exists)