Skip to content

Commit

Permalink
fix: linux ensuring ~/.local/share/applications exists
Browse files Browse the repository at this point in the history
  • Loading branch information
gariel committed Nov 19, 2023
1 parent 9833aeb commit 592b243
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions GodotEnv/src/features/godot/domain/GodotRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,10 @@ public async Task CreateShortcuts(GodotInstallation instalation) {
}

case OSType.Linux: {
var desktopFile = FileClient.Combine(FileClient.UserDirectory, ".local", "share", "applications", "Godot.desktop");
var userApplicationsPath = FileClient.Combine(FileClient.UserDirectory, ".local", "share", "applications");
var userIconsPath = FileClient.Combine(FileClient.UserDirectory, ".local", "share", "icons");

FileClient.CreateDirectory(userApplicationsPath);
FileClient.CreateDirectory(userIconsPath);

await NetworkClient.DownloadFileAsync(
Expand All @@ -409,7 +410,7 @@ await NetworkClient.DownloadFileAsync(
CancellationToken.None);

// https://github.com/godotengine/godot/blob/master/misc/dist/linux/org.godotengine.Godot.desktop
FileClient.CreateFile(desktopFile,
FileClient.CreateFile(FileClient.Combine(userApplicationsPath, "Godot.desktop"),
$"""
[Desktop Entry]
Name=Godot Engine
Expand Down

0 comments on commit 592b243

Please sign in to comment.