mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
dirstate: fix call to os.lstat when st is None
This commit is contained in:
parent
74267cb826
commit
ae14071210
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user