Skip to content

Commit

Permalink
fix application move fail on no folder
Browse files Browse the repository at this point in the history
  • Loading branch information
wiegell committed Nov 24, 2022
1 parent 8e58a0f commit 2d08276
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion AstroWall/ApplicationLayer/Helpers/General.Macos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,19 @@ public static string GetInstallPath()

public static string GetUserApplicationsPath()
{
return NSFileManager.DefaultManager
string path = NSFileManager.DefaultManager
.GetUrls(NSSearchPathDirectory.ApplicationDirectory, NSSearchPathDomain.User)[0]
.Path;
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
Console.WriteLine("Created user applications folder: " + path);
}
else
{
Console.WriteLine("user app folder found at: " + path);
}
return path;
}

public static string WantedBundleInstallPathInUserApplications()
Expand Down

0 comments on commit 2d08276

Please sign in to comment.