[Feature] if folder empty or not exists let user choose new root folder #192, version 1.0.18.3

This commit is contained in:
Markus Hofknecht 2021-09-24 15:58:37 +02:00
parent bf7a92f6b9
commit b1dd42518c
2 changed files with 8 additions and 5 deletions

View file

@ -46,7 +46,7 @@ namespace SystemTrayMenu
AppColors.BitmapFilesCount.Dispose();
}
internal static void SetFolderByWindowsContextMenu(string[] args)
public static void SetFolderByWindowsContextMenu(string[] args)
{
if (args != null && args.Length > 0)
{
@ -59,7 +59,8 @@ namespace SystemTrayMenu
public static bool LoadOrSetByUser()
{
bool pathOK = Directory.Exists(Path);
bool pathOK = FileLnk.IsNetworkPath(Path) ||
(Directory.Exists(Path) && Directory.GetFiles(Path).Length > 0);
if (!pathOK)
{
@ -87,7 +88,9 @@ namespace SystemTrayMenu
{
if (dialog.ShowDialog() == DialogResult.OK)
{
if (Directory.Exists(dialog.Folder))
if (FileLnk.IsNetworkPath(Path) ||
(Directory.Exists(dialog.Folder) &&
Directory.GetFiles(Path).Length > 0))
{
pathOK = true;
Settings.Default.PathDirectory =

View file

@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// 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.0.18.2")]
[assembly: AssemblyFileVersion("1.0.18.2")]
[assembly: AssemblyVersion("1.0.18.3")]
[assembly: AssemblyFileVersion("1.0.18.3")]