mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-18 05:58:30 +00:00
Add truncate while open
This commit is contained in:
parent
2ab17204c6
commit
267c59b1f1
@ -66,8 +66,7 @@ cpio_entry::~cpio_entry() {
|
||||
|
||||
void cpio::dump(const char *file) {
|
||||
fprintf(stderr, "Dump cpio: [%s]\n", file);
|
||||
int fd = xopen(file, O_WRONLY | O_CREAT, 0644);
|
||||
FDOutStream fd_out(fd, true);
|
||||
FDOutStream fd_out(xopen(file, O_WRONLY | O_CREAT | O_TRUNC, 0644), true);
|
||||
output(fd_out);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user