Allow to read archives if no unar, but internal decompressor is allowed.

This commit is contained in:
2025-07-26 17:00:02 +01:00
parent dc630f3e78
commit 3e731115f2
3 changed files with 5 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ public static class Settings
const string XDG_CONFIG_HOME_RESOLVED = ".config"; const string XDG_CONFIG_HOME_RESOLVED = ".config";
/// <summary>Current statistics</summary> /// <summary>Current statistics</summary>
public static SetSettings Current; public static SetSettings Current;
public static bool UnArUsable { get; set; } public static bool CanDecompress { get; set; }
/// <summary>Loads settings</summary> /// <summary>Loads settings</summary>
public static void LoadSettings() public static void LoadSettings()

View File

@@ -360,7 +360,7 @@ public sealed partial class SettingsViewModel : ViewModelBase
if(_unArChanged) if(_unArChanged)
{ {
Settings.Settings.Current.UnArchiverPath = UnArPath; Settings.Settings.Current.UnArchiverPath = UnArPath;
Settings.Settings.UnArUsable = true; Settings.Settings.CanDecompress = true;
} }
if(_compressionChanged) Settings.Settings.Current.Compression = Compression; if(_compressionChanged) Settings.Settings.Current.Compression = Compression;

View File

@@ -144,7 +144,9 @@ public sealed partial class SplashWindowViewModel : ViewModelBase
try try
{ {
var worker = new Compression(); var worker = new Compression();
Settings.Settings.UnArUsable = worker.CheckUnAr(Settings.Settings.Current.UnArchiverPath);
Settings.Settings.CanDecompress = worker.CheckUnAr(Settings.Settings.Current.UnArchiverPath) ||
Settings.Settings.Current.UseInternalDecompressor;
Dispatcher.UIThread.Post(LoadDatabase); Dispatcher.UIThread.Post(LoadDatabase);
} }