summaryrefslogtreecommitdiff
path: root/lockfile.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-05-18 09:01:06 -0700
committerJunio C Hamano <gitster@pobox.com>2009-05-18 09:01:06 -0700
commit36587681b4743c980e4e74a342dc5ec105314d08 (patch)
tree35f0267f12def071aadef8de84e257f606794135 /lockfile.c
parentf2a56171accb4fec03a30e513702283ab90088a1 (diff)
parentf6a5f1bb509a3af182fe568135398f1f2be15e5d (diff)
downloadgit-36587681b4743c980e4e74a342dc5ec105314d08.tar.gz
Merge branch 'ar/unlink-err'
* ar/unlink-err: print unlink(2) errno in copy_or_link_directory replace direct calls to unlink(2) with unlink_or_warn Introduce an unlink(2) wrapper which gives warning if unlink failed
Diffstat (limited to 'lockfile.c')
-rw-r--r--lockfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lockfile.c b/lockfile.c
index 828d19f452..eb931eded5 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -16,7 +16,7 @@ static void remove_lock_file(void)
lock_file_list->filename[0]) {
if (lock_file_list->fd >= 0)
close(lock_file_list->fd);
- unlink(lock_file_list->filename);
+ unlink_or_warn(lock_file_list->filename);
}
lock_file_list = lock_file_list->next;
}
@@ -259,7 +259,7 @@ void rollback_lock_file(struct lock_file *lk)
if (lk->filename[0]) {
if (lk->fd >= 0)
close(lk->fd);
- unlink(lk->filename);
+ unlink_or_warn(lk->filename);
}
lk->filename[0] = 0;
}