diff mercurial/dirstate.py @ 2429:6a8f7c3f7333

dirstate: fix call to os.lstat when st is None
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 13 Jun 2006 14:56:01 -0700
parents 150cde10ea21
children b77a2ef61b81
line wrap: on
line diff
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -455,8 +455,7 @@ class dirstate(object):
                 nonexistent = True
                 if not st:
                     try:
-                        f = self.wjoin(fn)
-                        st = os.lstat(f)
+                        st = os.lstat(self.wjoin(fn))
                     except OSError, inst:
                         if inst.errno != errno.ENOENT:
                             raise
@@ -472,7 +471,7 @@ class dirstate(object):
             # check the common case first
             if type_ == 'n':
                 if not st:
-                    st = os.stat(fn)
+                    st = os.stat(self.wjoin(fn))
                 if size >= 0 and (size != st.st_size
                                   or (mode ^ st.st_mode) & 0100):
                     modified.append(fn)