Skip to content

Commit 4bfb8bb

Browse files
committed
even more reliable at deleting/downloading!
dismisses pop up window when completed
1 parent affe7b7 commit 4bfb8bb

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

hbas.elf

256 Bytes
Binary file not shown.

hbas_dbg.elf

256 Bytes
Binary file not shown.

src/menu/HomebrewLaunchWindow.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,17 @@ void HomebrewLaunchWindow::OnDeleteButtonClick(GuiButton *button, const GuiContr
199199
// if the remove path is the whole directory, stop!
200200
if (!removePath.compare(std::string("sd:/wiiu/apps")) || !removePath.compare(std::string("sd:/wiiu/apps/")))
201201
return;
202-
203-
DirList dirList(removePath, 0, DirList::Files | DirList::CheckSubfolders);
204-
for (int x=0; x<dirList.GetFilecount(); x++)
205-
remove(dirList.GetFilepath(x));
206-
rmdir(removePath.c_str());
202+
else
203+
{
204+
// remove the files in the directory and the directory
205+
DirList dirList(removePath, 0, DirList::Files | DirList::CheckSubfolders);
206+
for (int x=0; x<dirList.GetFilecount(); x++)
207+
remove(dirList.GetFilepath(x));
208+
rmdir(removePath.c_str());
209+
}
210+
211+
// close the window
212+
OnBackButtonClick(button, controller, trigger);
207213
}
208214

209215
void HomebrewLaunchWindow::OnLoadButtonClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger)
@@ -220,6 +226,8 @@ void HomebrewLaunchWindow::OnLoadButtonClick(GuiButton *button, const GuiControl
220226
FileDownloader::getFile(repoUrl+path+"/meta.xml", sdPath+"/meta.xml", 0);
221227
FileDownloader::getFile(repoUrl+path+"/icon.png", sdPath+"/icon.png", 0);
222228

229+
// close the window
230+
OnBackButtonClick(button, controller, trigger);
223231

224232
// struct SYSBrowserArgsIn args = {};
225233
// std::string url = "http://vgmoose.com";

0 commit comments

Comments
 (0)