about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--redo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/redo.c b/redo.c
index f9fa518..8edf657 100644
--- a/redo.c
+++ b/redo.c
@@ -589,7 +589,8 @@ run_script(char *target, int implicit)
 		while (*--dirprefix != '/')
 			;
 	}
-	dirprefix++;
+	if (*dirprefix)
+		dirprefix++;
 
 	snprintf(temp_target, sizeof temp_target,
 	    "%s%s%s", dirprefix, "/"+(*dirprefix ? 0 : 1), temp_target_base);