summaryrefslogtreecommitdiff
path: root/tests-clar/clar_helpers.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-05-06 13:04:12 +0200
committernulltoken <emeric.fermas@gmail.com>2012-05-07 12:18:54 +0200
commit3191ae89c65c1685fdae59e03e1af7d7e8edabd8 (patch)
tree9f990d404fbc3317eaf92a2aa84413ab48b1cfb2 /tests-clar/clar_helpers.c
parent9b62e40ecdb92ab7493eac514e1399d791fa6f62 (diff)
downloadlibgit2-3191ae89c65c1685fdae59e03e1af7d7e8edabd8.tar.gz
compat: make p_open able to accept optional mode when passing the O_CREAT flag
This has the nice side effect of making test_attr_repo__staging_properly_normalizes_line_endings_according_to_gitattributes_directives() test pass again on Windows. This test started to fail after commit 674a198 was applied.
Diffstat (limited to 'tests-clar/clar_helpers.c')
-rw-r--r--tests-clar/clar_helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests-clar/clar_helpers.c b/tests-clar/clar_helpers.c
index 697614095..d180285b8 100644
--- a/tests-clar/clar_helpers.c
+++ b/tests-clar/clar_helpers.c
@@ -30,7 +30,7 @@ void cl_git_mkfile(const char *filename, const char *content)
void cl_git_write2file(const char *filename, const char *new_content, int flags)
{
- int fd = open(filename, flags, 0644);
+ int fd = p_open(filename, flags, 0644);
cl_assert(fd >= 0);
if (!new_content)
new_content = "\n";