new realization of cancel download [need review]

This commit is contained in:
2026-06-05 16:27:05 +03:00
parent ae81b806eb
commit 4be4bb926a
6 changed files with 94 additions and 55 deletions
+2 -2
View File
@@ -183,7 +183,7 @@ int process_query(app_t *app) {
if (!file_upload_start(query_args)) {
query_args->state = S_UPLOAD_FILE;
} else {
FILE_CLEAN(app);
FILE_CLEAN(app->query_args->file);
query_args->state = WAIT_CLIENT;
}
break;
@@ -198,7 +198,7 @@ int process_query(app_t *app) {
/* cancel case */
w_notification("Alert", dc_alert, "File %s didn't upload!",
query_args->file->name);
FILE_CLEAN(app);
FILE_CLEAN(app->query_args->file);
w_dialogue_t *d = &(app->modal);
d->needs_destroy = true;
query_args->state = WAIT_CLIENT;