Skip to content

Commit

Permalink
Fix: Fixed issue where compatibility settings weren't working (#11348)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrariofilippo authored Feb 17, 2023
1 parent 989aa9f commit b137fab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,11 @@ public void GetCompatibilityOptions()
{
var options = FileOperationsHelpers.ReadCompatOptions(ExePath);

if (options is not null)
CompatibilityOptions = CompatibilityOptions.FromString(options);
CompatibilityOptions = CompatibilityOptions.FromString(options);
}

public bool SetCompatibilityOptions()
=> FileOperationsHelpers.SetCompatOptions(ExePath, CompatibilityOptions?.ToString());
=> FileOperationsHelpers.SetCompatOptions(ExePath, CompatibilityOptions.ToString());

public Task RunTroubleshooter()
=> LaunchHelper.RunCompatibilityTroubleshooterAsync(ExePath);
Expand Down
2 changes: 1 addition & 1 deletion src/Files.Shared/CompatibilityOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override string ToString()
return System.Text.RegularExpressions.Regex.Replace(value.Trim(), @"\s+", " ");
}

public static CompatibilityOptions FromString(string rawValue)
public static CompatibilityOptions FromString(string? rawValue)
{
var compatOptions = new CompatibilityOptions();
if (!string.IsNullOrEmpty(rawValue))
Expand Down

0 comments on commit b137fab

Please sign in to comment.