diff options
author | Russell Belfer <arrbee@arrbee.com> | 2012-01-17 15:49:47 -0800 |
---|---|---|
committer | Russell Belfer <arrbee@arrbee.com> | 2012-01-17 15:49:47 -0800 |
commit | 1744fafec05d8fa3036a43f5e390c790810b05a5 (patch) | |
tree | b87f0616dd832ec66cc2450b5751b70d468a350e /src/reflog.c | |
parent | d1317f1b69cafb328ca9b263b2b71cddeb2290be (diff) | |
download | libgit2-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/reflog.c')
-rw-r--r-- | src/reflog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reflog.c b/src/reflog.c index a327975d6..970e7c2de 100644 --- a/src/reflog.c +++ b/src/reflog.c @@ -246,12 +246,12 @@ int git_reflog_write(git_reference *ref, const git_oid *oid_old, if (error < GIT_SUCCESS) goto cleanup; - if (git_futils_exists(log_path.ptr)) { + if (git_path_exists(log_path.ptr)) { error = git_futils_mkpath2file(log_path.ptr, GIT_REFLOG_DIR_MODE); if (error < GIT_SUCCESS) git__rethrow(error, "Failed to write reflog. Cannot create reflog directory"); - } else if (git_futils_isfile(log_path.ptr)) { + } else if (git_path_isfile(log_path.ptr)) { error = git__throw(GIT_ERROR, "Failed to write reflog. `%s` is directory", log_path.ptr); } else if (oid_old == NULL) { @@ -302,7 +302,7 @@ int git_reflog_delete(git_reference *ref) error = git_buf_join_n(&path, '/', 3, ref->owner->path_repository, GIT_REFLOG_DIR, ref->name); - if (error == GIT_SUCCESS && git_futils_exists(path.ptr) == 0) + if (error == GIT_SUCCESS && git_path_exists(path.ptr) == 0) error = p_unlink(path.ptr); git_buf_free(&path); |