summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2024-11-07 03:11:51 +0100
committerChristian Soffke <christian.soffke@gmail.com>2024-11-09 04:25:48 -0500
commiteb91595988ebd7e80dbb920e8004fc1f9c074411 (patch)
tree5703ae07f75a7dda410261d5f18a083925272b02
parent42b63daebb18c15c2ded43587b04dcb82f1d8f21 (diff)
downloadrockbox-eb91595988.tar.gz
rockbox-eb91595988.zip
fileop: display progress bar for single file deletion
Change-Id: Id895eb270b8ce1ad483c508c98d6318ba6069cf0
-rw-r--r--apps/fileop.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/fileop.c b/apps/fileop.c
index bcd5202cf4..4463168ac1 100644
--- a/apps/fileop.c
+++ b/apps/fileop.c
@@ -85,7 +85,7 @@ static bool poll_cancel_action(int operation, struct file_op_params *param)
{
const char *op_str = (operation == FOC_DELETE) ? str(LANG_DELETING) :
(operation == FOC_COPY) ? str(LANG_COPYING) :
- str(LANG_MOVING);
+ str(LANG_MOVING);
if ((operation == FOC_DELETE || !param->total_size) &&
param->objects > 0)
@@ -598,6 +598,9 @@ int delete_fileobject(const char *selected_file)
rc = directory_fileop(&param, FOC_DELETE);
cpu_boost(false);
} else {
+ param.objects = param.processed = 1;
+ if (poll_cancel_action(FOC_DELETE, &param))
+ return FORC_CANCELLED;
rc = remove(param.path) * 10;
}