From 64b8ac603a0f4a02eb2fb6e98048255bcdb14216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 4 Oct 2021 23:47:39 +0200 Subject: [PATCH] Fix bug in deleting of directories in memory stick move. Also improve progress reporting. --- UI/MemStickScreen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UI/MemStickScreen.cpp b/UI/MemStickScreen.cpp index 36a38cd255..9c6d71b0c1 100644 --- a/UI/MemStickScreen.cpp +++ b/UI/MemStickScreen.cpp @@ -688,6 +688,7 @@ UI::EventReturn ConfirmMemstickMoveScreen::OnConfirm(UI::EventParams ¶ms) { INFO_LOG(SYSTEM, "dry run: Would have created dir '%s'", dir.c_str()); } else { INFO_LOG(SYSTEM, "Creating dir '%s'", dir.c_str()); + progressReporter_.Set(dirSuffix); // Just ignore already-exists errors. File::CreateDir(dir); } @@ -735,7 +736,8 @@ UI::EventReturn ConfirmMemstickMoveScreen::OnConfirm(UI::EventParams ¶ms) { INFO_LOG(SYSTEM, "dry run: Would have deleted dir '%s'", dir.c_str()); } else { INFO_LOG(SYSTEM, "Deleting dir '%s'", dir.c_str()); - if (!File::Exists(dir)) { + progressReporter_.Set(dirSuffix); + if (File::Exists(dir)) { File::DeleteDir(dir); } }