mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-02-18 13:24:21 +01:00
Make fd_out read/write in preparation for reading, encrypting, and then writing header data back.
This commit is contained in:
parent
7cbf870679
commit
9049263f6f
4
lrzip.c
4
lrzip.c
|
|
@ -1027,9 +1027,9 @@ void compress_file(rzip_control *control)
|
|||
}
|
||||
|
||||
if (FORCE_REPLACE)
|
||||
fd_out = open(control->outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
fd_out = open(control->outfile, O_RDWR | O_CREAT | O_TRUNC, 0666);
|
||||
else
|
||||
fd_out = open(control->outfile, O_WRONLY | O_CREAT | O_EXCL, 0666);
|
||||
fd_out = open(control->outfile, O_RDWR | O_CREAT | O_EXCL, 0666);
|
||||
if (unlikely(fd_out == -1)) {
|
||||
/* We must ensure we don't delete a file that already
|
||||
* exists just because we tried to create a new one */
|
||||
|
|
|
|||
Loading…
Reference in a new issue