changeset 1228:db950da49539

Fix dangling symlink bug in dirstate walk code
author mpm@selenic.com
date Fri, 09 Sep 2005 11:46:35 -0700
parents e3ea354d99b2
children 2eb1cd695dd2
files mercurial/dirstate.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -252,7 +252,8 @@ class dirstate:
                     if seen(np):
                         continue
                     p = os.path.join(top, f)
-                    st = os.stat(p)
+                    # don't trip over symlinks
+                    st = os.lstat(p)
                     if stat.S_ISDIR(st.st_mode):
                         ds = os.path.join(nd, f +'/')
                         if statmatch(ds, st):