redo-always/redo-ifcreate/redo-stamp: work inside chdir().

If someone cd's to another directory and then runs redo-always, we weren't
adding to the right target.
This commit is contained in:
Avery Pennarun 2010-12-11 23:00:53 -08:00
commit e6f95521ae
6 changed files with 26 additions and 7 deletions

View file

@ -33,7 +33,9 @@ csum = sh.hexdigest()
if not vars.TARGET:
sys.exit(0)
f = state.File(name=vars.TARGET)
me = os.path.join(vars.STARTDIR,
os.path.join(vars.PWD, vars.TARGET))
f = state.File(name=me)
changed = (csum != f.csum)
debug2('%s: old = %s\n' % (f.name, f.csum))
debug2('%s: sum = %s (%s)\n' % (f.name, csum,