Skip to content

Commit

Permalink
fix agent fail on no folder
Browse files Browse the repository at this point in the history
  • Loading branch information
wiegell committed Nov 23, 2022
1 parent 1c1bc6d commit 70ec27e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion AstroWall/ApplicationLayer/Helpers/SystemEvents.Macos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ public static void RemoveLaunchAgent()

private static string agentPath()
{
return NSFileManager.HomeDirectory + "/Library/LaunchAgents/com.astro.wall.Astro-Wall.plist";
string agentFolder = NSFileManager.HomeDirectory + "/Library/LaunchAgents/";

if (!Directory.Exists(agentFolder))
{
Directory.CreateDirectory(agentFolder);
}
return agentFolder + "com.astro.wall.Astro-Wall.plist";
}
}
}
Expand Down

0 comments on commit 70ec27e

Please sign in to comment.