Skip to content

Commit

Permalink
delete: Terminate and re-initalize log to allow the log file to be de…
Browse files Browse the repository at this point in the history
…leted
  • Loading branch information
Joel16 committed Sep 6, 2020
1 parent 73c8348 commit 94102ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/popups/delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "fs.h"
#include "gui.h"
#include "imgui.h"
#include "log.h"
#include "popups.h"

namespace Popups {
Expand Down Expand Up @@ -29,6 +30,8 @@ namespace Popups {

if (ImGui::Button("OK", ImVec2(120, 0))) {
Result ret = 0;
Log::Exit();

if ((item.checked_count > 1) && (!item.checked_cwd.compare(config.cwd))) {
for (long unsigned int i = 0; i < item.checked.size(); i++) {
if (item.checked.at(i)) {
Expand All @@ -47,7 +50,8 @@ namespace Popups {
item.file_count = FS::RefreshEntries(&item.entries, item.file_count);
GUI::ResetCheckbox();
}


Log::Exit();
ImGui::CloseCurrentPopup();
item.state = MENU_STATE_HOME;
}
Expand Down

0 comments on commit 94102ad

Please sign in to comment.