Fix dangling symlink bug in dirstate walk code
authormpm@selenic.com
Fri, 09 Sep 2005 11:46:35 -0700
changeset 1228 db950da49539
parent 1227 e3ea354d99b2
child 1229 2eb1cd695dd2
Fix dangling symlink bug in dirstate walk code
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Fri Sep 09 11:34:34 2005 -0700
+++ b/mercurial/dirstate.py	Fri Sep 09 11:46:35 2005 -0700
@@ -252,7 +252,8 @@
                     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):