Squirrel.Windows
Squirrel.Windows copied to clipboard
RemoveShortcutsForExecutable isn't removing an empty folder from start menu
After removing the shortcut from the start menu, the folder in the start menu is now empty (most probably).
Here's a code fix for it:
if (f == ShortcutLocation.StartMenu) { var shortcutFileInfo = new FileInfo(file); var shortcutDir = shortcutFileInfo.Directory; this.ErrorIfThrows(() => { if (!shortcutDir.EnumerateFiles().Any()) shortcutDir.Delete(); }, "Couldn't delete directory: " + shortcutDir.FullName); }
In RemoveShortcutsForExecutable method