diff options
author | Richard M. Stallman <rms@gnu.org> | 2003-04-09 19:06:19 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2003-04-09 19:06:19 +0000 |
commit | 92464ae63f6bae0f1cf889389548ec51a2ff36dc (patch) | |
tree | a58ba145b5c9fe9aa061ccb1cc9a8a70103f812c /lisp/files.el | |
parent | f7df88f47ad8f3cfe9705f33cd27653906065746 (diff) | |
download | emacs-92464ae63f6bae0f1cf889389548ec51a2ff36dc.tar.gz |
(file-chase-links): Fix previous change.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/files.el b/lisp/files.el index 1d8cc2aa45e..d11014a9a0c 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -745,12 +745,11 @@ directory name is a symbolic link. 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 @@ it means chase no more than that many links and then stop." ;; 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) |