From 4d503f884a241c507ec4e474e3e3463c2e394d52 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 4 Jun 2009 16:48:53 +0100 Subject: [PATCH] gitfo_exists: replace call to stat() with access() Signed-off-by: Ramsay Jones Signed-off-by: Andreas Ericsson --- src/fileops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fileops.c b/src/fileops.c index 09e1e1219..581dc350d 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -55,8 +55,7 @@ int gitfo_write(git_file fd, void *buf, size_t cnt) int gitfo_exists(const char *path) { - struct stat sb; - return stat(path, &sb); + return access(path, F_OK); } off_t gitfo_size(git_file fd)