diff --git a/UI/DriverManagerScreen.cpp b/UI/DriverManagerScreen.cpp index e2f037cdbd89..fcaaa1a2f5be 100644 --- a/UI/DriverManagerScreen.cpp +++ b/UI/DriverManagerScreen.cpp @@ -200,6 +200,9 @@ UI::EventReturn DriverManagerScreen::OnCustomDriverChange(UI::EventParams &e) { } UI::EventReturn DriverManagerScreen::OnCustomDriverUninstall(UI::EventParams &e) { + if (e.s.empty()) { + return UI::EVENT_DONE; + } INFO_LOG(G3D, "Uninstalling driver: %s", e.s.c_str()); Path folder = GetDriverPath() / e.s; diff --git a/UI/MemStickScreen.cpp b/UI/MemStickScreen.cpp index 03b7f6fbe3d9..5e9f0d02bc05 100644 --- a/UI/MemStickScreen.cpp +++ b/UI/MemStickScreen.cpp @@ -753,6 +753,7 @@ UI::EventReturn ConfirmMemstickMoveScreen::OnConfirm(UI::EventParams ¶ms) { } // Delete all the old, now hopefully empty, directories. + // Hopefully DeleteDir actually fails if it contains a file... for (auto &dirSuffix : directorySuffixesToCreate) { Path dir = moveSrc / dirSuffix; if (dryRun) {