diff --git a/SandboxiePlus/SandMan/SbiePlusAPI.cpp b/SandboxiePlus/SandMan/SbiePlusAPI.cpp index 17fb623b..36db6fc9 100644 --- a/SandboxiePlus/SandMan/SbiePlusAPI.cpp +++ b/SandboxiePlus/SandMan/SbiePlusAPI.cpp @@ -236,8 +236,11 @@ void CSandBoxPlus::UpdateSize() void CSandBoxPlus::SetSize(quint64 Size) { - m_TotalSize = Size; - theConf->SetValue("SizeCache/" + m_Name, Size); + m_TotalSize = Size; + if (m_TotalSize == 0) + theConf->DelValue("SizeCache/" + m_Name); + else + theConf->SetValue("SizeCache/" + m_Name, Size); } bool CSandBoxPlus::IsSizePending() const diff --git a/SandboxiePlus/SandMan/Views/SbieView.cpp b/SandboxiePlus/SandMan/Views/SbieView.cpp index d9bb7f6b..826f7559 100644 --- a/SandboxiePlus/SandMan/Views/SbieView.cpp +++ b/SandboxiePlus/SandMan/Views/SbieView.cpp @@ -1208,6 +1208,7 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList& SandB Results.append((SandBoxes.first()->RenameBox(Value))); RenameItem(OldValue, Value); + theConf->DelValue("SizeCache/" + OldValue); } else if (Action == m_pMenuRecover) { @@ -1232,7 +1233,7 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList& SandB if (I.value().removeOne(pBox->GetName())) break; } - } + } } else if (Action == m_pMenuCleanUp) {