Fix more trouble with .do scripts that cd to other directories.

The interaction of REDO_STARTDIR, REDO_PWD, and getcwd() are pretty
complicated.  In this case, we accidentally assumed that the current
instance of redo was running with getcwd() == REDO_STARTDIR+REDO_PWD, and so
the new target was REDO_STARTDIR+REDO_PWD+t, but this isn't the case if the
current .do script did chdir().

The correct answer is REDO_STARTDIR+getcwd()+t.
This commit is contained in:
Avery Pennarun 2010-11-25 06:35:22 -08:00
commit c29de89051
4 changed files with 22 additions and 12 deletions

View file

@ -67,6 +67,9 @@ def debug(s):
def debug2(s):
if vars.DEBUG >= 2:
log_('redo: %s%s' % (vars.DEPTH, s))
def debug3(s):
if vars.DEBUG >= 3:
log_('redo: %s%s' % (vars.DEPTH, s))
def close_on_exec(fd, yes):