diff options
author | Vicent Martà <tanoku@gmail.com> | 2011-06-03 17:41:53 -0700 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2011-06-03 17:41:53 -0700 |
commit | 793545ef2bc0eb8b331ac715e77a3a77c8225320 (patch) | |
tree | e418f868da365e0064b23ece4baff764b5d3e50c /src/filebuf.c | |
parent | 3a42e0a3705d5d47ed32579721a62edf4ff297b1 (diff) | |
parent | fd0574e5ad4e2e5924ff0d0869da7d5846225d8b (diff) | |
download | libgit2-793545ef2bc0eb8b331ac715e77a3a77c8225320.tar.gz |
Merge pull request #227 from Romain-Geissler/discovery-path-v2
Discovery path v2
Diffstat (limited to 'src/filebuf.c')
-rw-r--r-- | src/filebuf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/filebuf.c b/src/filebuf.c index 63f2897cb..97dec83f3 100644 --- a/src/filebuf.c +++ b/src/filebuf.c @@ -41,16 +41,14 @@ static int lock_file(git_filebuf *file, int flags) /* create path to the file buffer is required */ if (flags & GIT_FILEBUF_FORCE) { - file->fd = gitfo_creat_force(file->path_lock, 0644); + file->fd = gitfo_creat_locked_force(file->path_lock, 0644); } else { - file->fd = gitfo_creat(file->path_lock, 0644); + file->fd = gitfo_creat_locked(file->path_lock, 0644); } if (file->fd < 0) return git__throw(GIT_EOSERR, "Failed to create lock"); - /* TODO: do a flock() in the descriptor file_lock */ - if ((flags & GIT_FILEBUF_APPEND) && gitfo_exists(file->path_original) == 0) { git_file source; char buffer[2048]; |