mirror of
https://github.com/Stone-Red-Code/ClipCMD.git
synced 2026-09-04 00:46:10 +02:00
Create appdata directory if it doesn't exist
This commit is contained in:
@@ -12,6 +12,7 @@ using Projektanker.Icons.Avalonia.FontAwesome;
|
||||
using Projektanker.Icons.Avalonia.MaterialDesign;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace ClipCmd;
|
||||
|
||||
@@ -28,6 +29,11 @@ public partial class App : Application
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
{
|
||||
if (!Directory.Exists(Configuration.ApplicationDataPath))
|
||||
{
|
||||
_ = Directory.CreateDirectory(Configuration.ApplicationDataPath);
|
||||
}
|
||||
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
desktop.MainWindow = new MainWindow();
|
||||
|
||||
Reference in New Issue
Block a user