@@ -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
209215void 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