diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2010-03-26 15:25:33 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-28 09:53:01 -0700 |
commit | d1723296af67e6bbadf6e73cd1e921aefafe491f (patch) | |
tree | 4a998c1b3da5b4848945eaede735518502c1c281 /wrapper.c | |
parent | Generalise the unlink_or_warn function (diff) | |
download | tgif-d1723296af67e6bbadf6e73cd1e921aefafe491f.tar.xz |
Implement the rmdir_or_warn function
This patch implements an rmdir_or_warn function (like unlink_or_warn
but for directories) that uses the generalised warning code in
warn_if_unremovable.
Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wrapper.c')
-rw-r--r-- | wrapper.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -328,3 +328,8 @@ int unlink_or_warn(const char *file) { return warn_if_unremovable("unlink", file, unlink(file)); } + +int rmdir_or_warn(const char *file) +{ + return warn_if_unremovable("rmdir", file, rmdir(file)); +} |