fix wrong path in error message
diff --git a/lib/patch.c b/lib/patch.c
index 9b49b4b..9841808 100644
--- a/lib/patch.c
+++ b/lib/patch.c
@@ -612,7 +612,7 @@ apply_patch(struct got_worktree *worktree, struct got_repository *repo,
}
if (fchmod(fileno(tmp), mode) == -1) {
- err = got_error_from_errno2("chmod", newpath);
+ err = got_error_from_errno2("chmod", tmppath);
goto done;
}