diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-04-04 01:30:18 +0200 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-04-04 01:31:29 +0200 |
commit | bbb3723657cb595754099036ee080849b218f285 (patch) | |
tree | 25068496945c5d0edbb33194186e1a2f543e8baf | |
parent | a12c291b54288fd71b09282a0722d96776ee43bf (diff) | |
download | libgit2-bbb3723657cb595754099036ee080849b218f285.tar.gz |
clar: Properly create file in helper
-rw-r--r-- | tests-clar/clar_helpers.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests-clar/clar_helpers.c b/tests-clar/clar_helpers.c index 22db56f0c..e90bb8737 100644 --- a/tests-clar/clar_helpers.c +++ b/tests-clar/clar_helpers.c @@ -30,13 +30,12 @@ void cl_git_mkfile(const char *filename, const char *content) void cl_git_append2file(const char *filename, const char *new_content) { - int fd = p_open(filename, O_WRONLY | O_APPEND | O_CREAT); + int fd = p_creat(filename, 0644); cl_assert(fd != 0); if (!new_content) new_content = "\n"; cl_must_pass(p_write(fd, new_content, strlen(new_content))); cl_must_pass(p_close(fd)); - cl_must_pass(p_chmod(filename, 0644)); } static const char *_cl_sandbox = NULL; |