mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-02 16:34:37 +00:00
Merge pull request #4175 from libgit2/ethomson/dont_trunc_and_excl
git_futils: don't O_EXCL and O_TRUNC
This commit is contained in:
commit
1d39a60319
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user