commit - 5f202665e2b4cbf6f91639324020b3591df7ec6c
commit + 19305070924df3384e8d0cc9d561b183ffd0bdef
blob - 4719e5dbdd776ed4b252cda4a1e43672e360f591
blob + edbcc7342bcb01d006c2e0688e8f5674d0e891b7
--- got/got.c
+++ got/got.c
* Assume this path will fail. This will be corrected
* in print_path_info() in case the path does suceeed.
*/
- pe->data = (void *)got_error_path(pe->path,
- GOT_ERR_BAD_PATH);
+ pe->data = (void *)got_error(GOT_ERR_BAD_PATH);
}
error = got_worktree_path_info(worktree, &paths,
print_path_info, &paths, check_cancelled, NULL);
goto done;
TAILQ_FOREACH(pe, &paths, entry) {
if (pe->data != NULL) {
- error = pe->data; /* bad path */
+ const struct got_error *perr;
+
+ perr = pe->data;
+ error = got_error_fmt(perr->code, "%s",
+ pe->path);
break;
}
}