Fix FAT driver file modes, update filewriter accordingly
Some checks failed
Build documentation / build-and-deploy (push) Has been cancelled
Some checks failed
Build documentation / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -426,12 +426,19 @@ static void execute_redir (struct ast_redir* redir, struct context* context) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t fw_flags = FW_CREATE_FILE | FW_TRUNCATE;
|
||||
|
||||
struct filewriter fw;
|
||||
if ((ret = filewriter_init (&fw, volume, path, FW_CREATE_FILE | FW_APPEND)) < 0) {
|
||||
if ((ret = filewriter_init (&fw, volume, path, fw_flags)) < 0) {
|
||||
cprintf (context, "ERROR could not initialize filewriter for '%s:%s'\n", volume, path);
|
||||
return;
|
||||
}
|
||||
|
||||
if (context->strbuf.count == 0) {
|
||||
filewriter_fini (&fw);
|
||||
return;
|
||||
}
|
||||
|
||||
size_t chunk_size = 1024;
|
||||
size_t chunks = (context->strbuf.count - 1) / chunk_size;
|
||||
size_t rem = (context->strbuf.count - 1) % chunk_size;
|
||||
|
||||
Reference in New Issue
Block a user