mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-10 22:55:29 +00:00
Merge pull request #2734 from jeffhostetler/jeffhostetler/git_mkfile
fix cl_git_mkfile() to test for -1 rather than 0 for errors from p_creat...
This commit is contained in:
commit
169497d1e7
@ -18,7 +18,7 @@ void cl_git_mkfile(const char *filename, const char *content)
|
|||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
fd = p_creat(filename, 0666);
|
fd = p_creat(filename, 0666);
|
||||||
cl_assert(fd != 0);
|
cl_assert(fd != -1);
|
||||||
|
|
||||||
if (content) {
|
if (content) {
|
||||||
cl_must_pass(p_write(fd, content, strlen(content)));
|
cl_must_pass(p_write(fd, content, strlen(content)));
|
||||||
|
Loading…
Reference in New Issue
Block a user