summaryrefslogtreecommitdiff
path: root/src/filebuf.c
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-01-17 15:49:47 -0800
committerRussell Belfer <arrbee@arrbee.com>2012-01-17 15:49:47 -0800
commit1744fafec05d8fa3036a43f5e390c790810b05a5 (patch)
treeb87f0616dd832ec66cc2450b5751b70d468a350e /src/filebuf.c
parentd1317f1b69cafb328ca9b263b2b71cddeb2290be (diff)
downloadlibgit2-1744fafec05d8fa3036a43f5e390c790810b05a5.tar.gz
Move path related functions from fileops to path
This takes all of the functions that look up simple data about paths (such as `git_futils_isdir`) and moves them over to path.h (becoming `git_path_isdir`). This leaves fileops.h just with functions that actually manipulate the filesystem or look at the file contents in some way. As part of this, the dir.h header which is really just for win32 support was moved into win32 (with some minor changes).
Diffstat (limited to 'src/filebuf.c')
-rw-r--r--src/filebuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/filebuf.c b/src/filebuf.c
index aa47d5eb0..447d8a089 100644
--- a/src/filebuf.c
+++ b/src/filebuf.c
@@ -16,7 +16,7 @@ static const size_t WRITE_BUFFER_SIZE = (4096 * 2);
static int lock_file(git_filebuf *file, int flags)
{
- if (git_futils_exists(file->path_lock) == 0) {
+ if (git_path_exists(file->path_lock) == 0) {
if (flags & GIT_FILEBUF_FORCE)
p_unlink(file->path_lock);
else
@@ -34,7 +34,7 @@ static int lock_file(git_filebuf *file, int flags)
if (file->fd < 0)
return git__throw(GIT_EOSERR, "Failed to create lock");
- if ((flags & GIT_FILEBUF_APPEND) && git_futils_exists(file->path_original) == 0) {
+ if ((flags & GIT_FILEBUF_APPEND) && git_path_exists(file->path_original) == 0) {
git_file source;
char buffer[2048];
size_t read_bytes;
@@ -60,7 +60,7 @@ void git_filebuf_cleanup(git_filebuf *file)
if (file->fd >= 0)
p_close(file->fd);
- if (file->fd >= 0 && file->path_lock && git_futils_exists(file->path_lock) == GIT_SUCCESS)
+ if (file->fd >= 0 && file->path_lock && git_path_exists(file->path_lock) == GIT_SUCCESS)
p_unlink(file->path_lock);
if (file->digest)