Loading GarrigueGamesLauncher/Services/GameImporterService.cs +7 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ using System.Text.Json.Serialization.Metadata; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using System.Web; using Avalonia.Controls; using Avalonia.Platform.Storage; using GarrigueGamesLauncher.Interfaces; Loading Loading @@ -100,7 +99,13 @@ public class GameImporterService( /// <returns>True if the game was successfully imported; otherwise, false.</returns> private async Task<bool> ImportGameAsync(IStorageFile file) { var zipPath = HttpUtility.UrlDecode(file.Path.AbsolutePath); var zipPath = file.TryGetLocalPath(); if (zipPath == null) { _ = EnqueueImportErrorMessage(file, $"Could not get local path for file {file.Path}"); return false; } var targetPath = Path.Join(TempDirPath, Guid.NewGuid().ToString()); var result = await Unzip(zipPath, targetPath); Loading Loading
GarrigueGamesLauncher/Services/GameImporterService.cs +7 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ using System.Text.Json.Serialization.Metadata; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using System.Web; using Avalonia.Controls; using Avalonia.Platform.Storage; using GarrigueGamesLauncher.Interfaces; Loading Loading @@ -100,7 +99,13 @@ public class GameImporterService( /// <returns>True if the game was successfully imported; otherwise, false.</returns> private async Task<bool> ImportGameAsync(IStorageFile file) { var zipPath = HttpUtility.UrlDecode(file.Path.AbsolutePath); var zipPath = file.TryGetLocalPath(); if (zipPath == null) { _ = EnqueueImportErrorMessage(file, $"Could not get local path for file {file.Path}"); return false; } var targetPath = Path.Join(TempDirPath, Guid.NewGuid().ToString()); var result = await Unzip(zipPath, targetPath); Loading