Skip to content

Commit

Permalink
Fixed typos for linux compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
thesupersonic16 committed Feb 21, 2025
1 parent 4865f54 commit 32e0bfc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions Source/HedgeModManager.UI/Languages/en-AU.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
<system:String xml:space="preserve" x:Key="Modal.Message.GameNoAccess">Hedge Mod Manager does not have write&#x0a;access to the game files.&#x0a;&#x0a;Please make sure the game files are writable.</system:String>
<system:String xml:space="preserve" x:Key="Modal.Message.GamescopeError">Mod configuration has been saved.&#x0a;&#x0a;Hedge Mod Manager currently cannot launch games while in Gaming Mode.&#x0a;&#x0a;Please exit Hedge Mod Manager then launch the game.</system:String>
<system:String xml:space="preserve" x:Key="Modal.Message.InstallError">Failed to install mod. Check log for exception.</system:String>
<system:String xml:space="preserve" x:Key="Modal.Message.ModLoaderInstallError">An error occurred while trying to install the mod loader.&#x0a;&#x0a;Check log for exception.</system:String>
<system:String xml:space="preserve" x:Key="Modal.Message.PkgUpdate">Please update Hedge Mod Manager using your system's package manager.</system:String>
<system:String xml:space="preserve" x:Key="Modal.Message.SelectModsError">Hedge Mod Manager does not have permissions to the selected directory.&#x0a;&#x0a;Please select another directory.</system:String>
<system:String xml:space="preserve" x:Key="Modal.Message.UpdateMod">There is an update available for {0}.&#x0a;&#x0a;Would you like to update the mod?</system:String>
Expand Down
4 changes: 4 additions & 0 deletions Source/HedgeModManager.UI/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ await CreateSimpleDownload("Download.Text.InstallModLoader", "Failed to install
}
IsBusy = false;
Dispatcher.UIThread.Invoke(RefreshUI);
}).OnError((d, e) =>
{
OpenErrorMessage("Modal.Title.InstallError", "Modal.Message.ModLoaderInstallError", "Failed to install modloader", e);
return Task.CompletedTask;
}).RunAsync(this);
}

Expand Down
11 changes: 6 additions & 5 deletions Source/HedgeModManager/LinuxCompatibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ await Task.Run(() =>
if (entry.FullName.EndsWith('/'))
{
// Untested, tests from HMM 7 to 8 is needed
if (Directory.Exists(path) || File.Exists(path))
if (Directory.Exists(destinationPath) || File.Exists(destinationPath))
{
var attributes = new FileInfo(path).Attributes;
var attributes = new FileInfo(destinationPath).Attributes;
if (attributes.HasFlag(FileAttributes.ReparsePoint))
{
Logger.Debug($"Symlink detected, unlinking \"{path}\"");
File.Delete(path);
Logger.Debug($"Symlink detected, unlinking \"{destinationPath}\"");
File.Delete(destinationPath);
}
else
{
Directory.Delete(path, true);
Directory.Delete(destinationPath, true);
}
}
continue;
Expand All @@ -63,6 +63,7 @@ await Task.Run(() =>
File.Delete(destinationPath);
}

Directory.CreateDirectory(Path.GetDirectoryName(destinationPath)!);
entry.ExtractToFile(destinationPath, true);
}
Logger.Debug($"Extracted .NET runtime");
Expand Down

0 comments on commit 32e0bfc

Please sign in to comment.