Skip to content

Commit

Permalink
[Feature] if folder empty or not exists let user choose new root folder
Browse files Browse the repository at this point in the history
#192, version 1.0.18.3
  • Loading branch information
Hofknecht committed Sep 24, 2021
1 parent bf7a92f commit b1dd425
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions Config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void Dispose()
AppColors.BitmapFilesCount.Dispose();
}

internal static void SetFolderByWindowsContextMenu(string[] args)
public static void SetFolderByWindowsContextMenu(string[] args)
{
if (args != null && args.Length > 0)
{
Expand All @@ -59,7 +59,8 @@ internal static void SetFolderByWindowsContextMenu(string[] args)

public static bool LoadOrSetByUser()
{
bool pathOK = Directory.Exists(Path);
bool pathOK = FileLnk.IsNetworkPath(Path) ||
(Directory.Exists(Path) && Directory.GetFiles(Path).Length > 0);

if (!pathOK)
{
Expand Down Expand Up @@ -87,7 +88,9 @@ public static bool SetFolderByUser(bool save = true)
{
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 =
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.0.18.2")]
[assembly: AssemblyFileVersion("1.0.18.2")]
[assembly: AssemblyVersion("1.0.18.3")]
[assembly: AssemblyFileVersion("1.0.18.3")]

0 comments on commit b1dd425

Please sign in to comment.