mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-02 11:32:24 +12:00
[BUG] DirectoryNotFoundException when GenerateDriveShortctus enabled and move root folder (#302), version 1.2.2.8
This commit is contained in:
parent
27a77d5b31
commit
27f2fed2f8
|
@ -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.2.7")]
|
||||
[assembly: AssemblyFileVersion("1.2.2.7")]
|
||||
[assembly: AssemblyVersion("1.2.2.8")]
|
||||
[assembly: AssemblyFileVersion("1.2.2.8")]
|
||||
|
|
|
@ -30,7 +30,15 @@ namespace SystemTrayMenu.Utilities
|
|||
foreach (char driveName in driveNamesToRemove)
|
||||
{
|
||||
string possibleShortcut = GetLinkPathFromDriveName(driveName.ToString());
|
||||
System.IO.File.Delete(possibleShortcut);
|
||||
|
||||
try
|
||||
{
|
||||
System.IO.File.Delete(possibleShortcut);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Warn($"Could not delete shortcut at path:'{possibleShortcut}'", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue