diff --git a/QuickNotes/Community.PowerToys.Run.Plugin.QuickNotes/Main.cs b/QuickNotes/Community.PowerToys.Run.Plugin.QuickNotes/Main.cs index 7831358..ca4a05f 100644 --- a/QuickNotes/Community.PowerToys.Run.Plugin.QuickNotes/Main.cs +++ b/QuickNotes/Community.PowerToys.Run.Plugin.QuickNotes/Main.cs @@ -267,11 +267,11 @@ public void Init(PluginInitContext context) Context.API.ThemeChanged += OnThemeChanged; var customPath = Environment.GetEnvironmentVariable(CUSTOM_PATH_ENV_VAR); - var appDataPath = string.IsNullOrEmpty(customPath) - ? Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + var appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + var powerToysPath = string.IsNullOrEmpty(customPath) + ? Path.Combine(appDataPath, "Microsoft", "PowerToys", "QuickNotes") : customPath; - - var powerToysPath = Path.Combine(appDataPath, "Microsoft", "PowerToys", "QuickNotes"); + if (!Directory.Exists(powerToysPath)) Directory.CreateDirectory(powerToysPath);