diff options
| author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2009-06-04 16:48:53 +0100 |
|---|---|---|
| committer | Andreas Ericsson <ae@op5.se> | 2009-06-05 10:21:25 +0200 |
| commit | 4d503f884a241c507ec4e474e3e3463c2e394d52 (patch) | |
| tree | 963f3cc863ffc5d238de5ac3f425df6ef1e3e3ea /src/fileops.c | |
| parent | ac04bdf6e0ee6bb4286343bc70d745146eb1e506 (diff) | |
| download | libgit2-4d503f884a241c507ec4e474e3e3463c2e394d52.tar.gz | |
gitfo_exists: replace call to stat() with access()
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
Diffstat (limited to 'src/fileops.c')
| -rw-r--r-- | src/fileops.c | 3 |
1 files changed, 1 insertions, 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) |
