diff options
author | Patrick Steinhardt <ps@pks.im> | 2017-03-24 08:26:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-24 08:26:33 +0100 |
commit | 1d39a603198e2b93a15d4e744fa664b56e8b464d (patch) | |
tree | 8b60c492a2af19a0c9c87cfc264399fc9fac2636 | |
parent | fa86a095cbde3945e6c9fba0efb757e24b03652e (diff) | |
parent | 4a26915d34414709bfb93a688ac9ae93dbe5828e (diff) | |
download | libgit2-1d39a603198e2b93a15d4e744fa664b56e8b464d.tar.gz |
Merge pull request #4175 from libgit2/ethomson/dont_trunc_and_excl
git_futils: don't O_EXCL and O_TRUNC
-rw-r--r-- | src/fileops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileops.c b/src/fileops.c index 28f414f23..ad2a988a9 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -66,8 +66,8 @@ int git_futils_creat_withpath(const char *path, const mode_t dirmode, const mode int git_futils_creat_locked(const char *path, const mode_t mode) { - int fd = p_open(path, O_WRONLY | O_CREAT | O_TRUNC | - O_EXCL | O_BINARY | O_CLOEXEC, mode); + int fd = p_open(path, O_WRONLY | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, + mode); if (fd < 0) { int error = errno; |