From cf7b4e754886e19bf3e73a6727a4f279e529cafb Mon Sep 17 00:00:00 2001 From: fengzero Date: Mon, 20 Oct 2025 03:28:39 +0000 Subject: [PATCH] replace tar with zip db data --- plugins/restful/normal_handle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/restful/normal_handle.c b/plugins/restful/normal_handle.c index eb7f6c1e..0d1d8675 100644 --- a/plugins/restful/normal_handle.c +++ b/plugins/restful/normal_handle.c @@ -925,14 +925,14 @@ void handle_export_db(nng_aio *aio) utarray_free(nodes); - system("rm -rf neuron.tar.gz"); - system("tar -zcf neuron.tar.gz nodes.csv settings.csv groups.csv tags.csv " + system("rm -rf neuron.zip"); + system("zip neuron.zip nodes.csv settings.csv groups.csv tags.csv " "subscribes.csv"); void * data = NULL; size_t len = 0; - rv = read_file("neuron.tar.gz", &data, &len); + rv = read_file("neuron.zip", &data, &len); if (rv != 0) { NEU_JSON_RESPONSE_ERROR(NEU_ERR_FILE_READ_FAILURE, { neu_http_response(aio, error_code.error, result_error); @@ -940,6 +940,6 @@ void handle_export_db(nng_aio *aio) return; } neu_http_response_file(aio, data, len, - "attachment; filename=\"neuron.tar.gz\""); + "attachment; filename=\"neuron.zip\""); free(data); }