diff --git a/src/media_async/media_async.c b/src/media_async/media_async.c index b9f5a792..3a19ebea 100644 --- a/src/media_async/media_async.c +++ b/src/media_async/media_async.c @@ -164,7 +164,7 @@ int ma_copy_file(const char* source, const char* destination) { int status = file_io_paths(source, destination); uint64_t total = 0; if (status == 0) phase = "create temporary"; - if (status == 0 && file_io_temp_open(&output, destination)) status = -1; + if (status == 0 && file_io_temp_open(&output, destination, 0)) status = -1; if (status == 0) { uint8_t buffer[65536]; size_t count; while (1) { diff --git a/src/media_delivery/media_delivery.c b/src/media_delivery/media_delivery.c index 4e705ac3..b752c9c9 100644 --- a/src/media_delivery/media_delivery.c +++ b/src/media_delivery/media_delivery.c @@ -277,7 +277,7 @@ struct media_block_source* md_block_create(struct media_delivery_ctx* md, uint64 source->entry = entry; source->md = md; source->refs = 1; source->owned = 1; source->group_id = group_id; source->chunk = chunk; source->size = size; memcpy(source->media_id, media_id, 16); memcpy(source->block_id, block_id, 16); - if (file_io_temp_open(&source->storage, destination) || file_io_temp_finish(&source->storage)) { + if (file_io_temp_open(&source->storage, destination, 0) || file_io_temp_finish(&source->storage)) { DEBUG_ERROR(DEBUG_CATEGORY_MEDIA, "%s: block temp creation failed chunk=%u", MD_ID, chunk); md_block_release(source); return NULL; } diff --git a/src/media_delivery/media_download.c b/src/media_delivery/media_download.c index 39c23fc1..31a6d239 100644 --- a/src/media_delivery/media_download.c +++ b/src/media_delivery/media_download.c @@ -633,7 +633,7 @@ static int md_dl_register_servable(struct media_download* dl) { /* Запись назначения начинается только после проверки блоков. До publish старое имя сохраняет прежние байты. */ static int md_dl_assemble(struct media_download* dl) { struct file_io_temp output = {0}; - int failed = file_io_temp_open(&output, dl->dest_path); + int failed = file_io_temp_open(&output, dl->dest_path, 0); uint64_t total = 0; uint8_t buffer[65536]; for (int bi = 0; bi < dl->num_blocks && !failed; bi++) {