summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'wrapper.c')
-rw-r--r--wrapper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/wrapper.c b/wrapper.c
index 4017bff6bb..10a6750795 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -333,3 +333,8 @@ int rmdir_or_warn(const char *file)
{
return warn_if_unremovable("rmdir", file, rmdir(file));
}
+
+int remove_or_warn(unsigned int mode, const char *file)
+{
+ return S_ISGITLINK(mode) ? rmdir_or_warn(file) : unlink_or_warn(file);
+}