about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-09-06 21:12:33 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-09-06 21:12:33 +0200
commit467d98065f9076b2f63423dba1d9fafd1c5b8ee1 (patch)
treed2a3a4a0ea6f87b89568e039f25082748afabd1a
parent94cc057fa4ad9e6c0bbecb9c88e32937b0dc5a4c (diff)
downloadredo-c-467d98065f9076b2f63423dba1d9fafd1c5b8ee1.tar.gz
redo-c-467d98065f9076b2f63423dba1d9fafd1c5b8ee1.tar.xz
redo-c-467d98065f9076b2f63423dba1d9fafd1c5b8ee1.zip
record_deps needs to go back to where redo started, so the paths make sense
-rw-r--r--redo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/redo.c b/redo.c
index 8398962..3ef8723 100644
--- a/redo.c
+++ b/redo.c
@@ -842,6 +842,8 @@ record_deps(int targetc, char *targetv[])
 	if (dep_fd < 0)
 		return;
 
+	fchdir(dir_fd);
+
 	for (targeti = 0; targeti < targetc; targeti++) {
 		fd = open(targetv[targeti], O_RDONLY);
 		if (fd < 0)