refix #318, #346, create AppData/Local/PersistentWindows directory during startup

This commit is contained in:
Kang Yu 2024-08-08 12:00:57 -07:00
parent e99518f23b
commit 4136e5d2a1
2 changed files with 6 additions and 2 deletions

View file

@ -280,6 +280,9 @@ namespace PersistentWindows.SystrayShell
#endif
AppdataFolder = appDataFolder;
if (!Directory.Exists(appDataFolder))
Directory.CreateDirectory(appDataFolder);
// default icons
var iconHandle = (legacy_icon ? Properties.Resources.pwIcon2: Properties.Resources.pwIcon).GetHicon();
IdleIcon = System.Drawing.Icon.FromHandle(iconHandle);