Skip to content

Commit

Permalink
[BUG] Fix ArgumentException: Illegal characters in path (#171), versi…
Browse files Browse the repository at this point in the history
…on 1.0.17.44
  • Loading branch information
Hofknecht committed May 21, 2021
1 parent 027e514 commit 1aa3dec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Business/Menus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,16 @@ static string[] GetDirectoriesInNetworkLocation(string networkLocationRootPath)
Log.Warn($"path:'{path}'", ex);
}

foreach (string file in files)
foreach (string fileWithIllegalCharacters in files)
{
if (worker != null && worker.CancellationPending)
{
break;
}

// https://github.com/Hofknecht/SystemTrayMenu/issues/171
string file = fileWithIllegalCharacters.Replace("\x00", string.Empty);

bool hiddenEntry = false;
if (FolderOptions.IsHidden(file, ref hiddenEntry))
{
Expand Down

0 comments on commit 1aa3dec

Please sign in to comment.