[BUG] Do not spam logfile with access denied (#363), version 1.2.8.7

This commit is contained in:
Markus Hofknecht 2022-02-20 18:43:57 +01:00
parent 49eac15a87
commit aef79c431a
2 changed files with 7 additions and 2 deletions

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.2.8.5")]
[assembly: AssemblyFileVersion("1.2.8.5")]
[assembly: AssemblyVersion("1.2.8.7")]
[assembly: AssemblyFileVersion("1.2.8.7")]

View file

@ -72,6 +72,11 @@ namespace SystemTrayMenu.Utilities
resolvedFilename = link.Path;
}
}
catch (UnauthorizedAccessException)
{
// https://stackoverflow.com/questions/2934420/why-do-i-get-e-accessdenied-when-reading-public-shortcuts-through-shell32
// e.g. Administrative Tools\Component Services.lnk which can not be resolved, do not spam the logfile in this case
}
catch (Exception ex)
{
Log.Warn($"shortcutFilename:'{shortcutFilename}'", ex);