mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-18 14:07:39 +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) {
|
void cpio::dump(const char *file) {
|
||||||
fprintf(stderr, "Dump cpio: [%s]\n", file);
|
fprintf(stderr, "Dump cpio: [%s]\n", file);
|
||||||
int fd = xopen(file, O_WRONLY | O_CREAT, 0644);
|
FDOutStream fd_out(xopen(file, O_WRONLY | O_CREAT | O_TRUNC, 0644), true);
|
||||||
FDOutStream fd_out(fd, true);
|
|
||||||
output(fd_out);
|
output(fd_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user