Skip to content

Commit

Permalink
[BUG] Restart automatically in case folder was empty (#366), 1.2.8.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofknecht committed Feb 26, 2022
1 parent 9234515 commit 37ec270
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 deletions.
31 changes: 8 additions & 23 deletions Business/Menus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ internal class Menus : IDisposable
private DateTime deactivatedTime = DateTime.MinValue;
private DateTime dateTimeLastOpening = DateTime.MinValue;
private OpenCloseState openCloseState = OpenCloseState.Default;
private bool showingMessageBox;
private TaskbarPosition taskbarPosition = new WindowsTaskbar().Position;
private bool searchTextChanging;
private bool waitingForReactivate;
Expand Down Expand Up @@ -126,30 +125,16 @@ void LoadMainMenuCompleted(object sender, RunWorkerCompletedEventArgs e)

break;
case MenuDataValidity.Empty:
IconReader.MainPreload = false;
if (!showingMessageBox)
{
showingMessageBox = true;
MessageBox.Show(Translator.GetText(
"MessageRootFolderEmpty"));
OpenFolder();
Config.SetFolderByUser();
showingMessageBox = false;
}

MessageBox.Show(Translator.GetText("MessageRootFolderEmpty"));
OpenFolder();
Config.SetFolderByUser();
AppRestart.ByConfigChange();
break;
case MenuDataValidity.NoAccess:
IconReader.MainPreload = false;
if (!showingMessageBox)
{
showingMessageBox = true;
MessageBox.Show(Translator.GetText(
"MessageRootFolderNoAccess"));
OpenFolder();
Config.SetFolderByUser();
showingMessageBox = false;
}

MessageBox.Show(Translator.GetText("MessageRootFolderNoAccess"));
OpenFolder();
Config.SetFolderByUser();
AppRestart.ByConfigChange();
break;
case MenuDataValidity.AbortedOrUnknown:
Log.Info("MenuDataValidity.AbortedOrUnknown");
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.8.10")]
[assembly: AssemblyFileVersion("1.2.8.10")]
[assembly: AssemblyVersion("1.2.8.11")]
[assembly: AssemblyFileVersion("1.2.8.11")]

0 comments on commit 37ec270

Please sign in to comment.