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>
Nguyễn Thái Ngọc Duy committed
May 8, 2016 at 16:47 UTC
8d19e9309411ca875928b9336ff626b8b6851fcb
1 file changed
+1
-1
builtin/worktree.c
+1
-1
@@ -109,7 +109,7 @@ static void prune_worktrees(void)
109
if (ret < 0 && errno == ENOTDIR)
110
ret = unlink(path.buf);
111
if (ret)
112
- error(_("failed to remove: %s"), strerror(errno));
112
+ error_errno(_("failed to remove '%s'"), path.buf);
113
}
114
closedir(dir);
115
if (!show_only)