builtin/worktree.c: use error_errno()
While at there, improve the error message to say _what_ failed to remove. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
17bef17ef8
commit
8d19e93094
@ -109,7 +109,7 @@ static void prune_worktrees(void)
|
||||
if (ret < 0 && errno == ENOTDIR)
|
||||
ret = unlink(path.buf);
|
||||
if (ret)
|
||||
error(_("failed to remove: %s"), strerror(errno));
|
||||
error_errno(_("failed to remove '%s'"), path.buf);
|
||||
}
|
||||
closedir(dir);
|
||||
if (!show_only)
|
||||
|
Loading…
Reference in New Issue
Block a user