mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-03 11:51:53 +00:00
Add truncate while open
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user