diff --git a/SPTInstaller/Helpers/DirectorySizeHelper.cs b/SPTInstaller/Helpers/DirectorySizeHelper.cs index 59114d9..c27caa8 100644 --- a/SPTInstaller/Helpers/DirectorySizeHelper.cs +++ b/SPTInstaller/Helpers/DirectorySizeHelper.cs @@ -13,7 +13,7 @@ public static class DirectorySizeHelper var installTargetDirectoryInfo = new DirectoryInfo(installTargetDirPath); var eftSourceDirSize = GetSizeOfDirectory(eftSourceDirectoryInfo); - var availableSize = DriveInfo.GetDrives().FirstOrDefault(d => d.Name == installTargetDirectoryInfo.Root.Name)?.AvailableFreeSpace ?? 0; + var availableSize = DriveInfo.GetDrives().FirstOrDefault(d => d.Name.ToLower() == installTargetDirectoryInfo.Root.Name.ToLower())?.AvailableFreeSpace ?? 0; return eftSourceDirSize < availableSize; } diff --git a/SPTInstaller/Installer Tasks/IntializationTask.cs b/SPTInstaller/Installer Tasks/IntializationTask.cs index a39c238..5d9a163 100644 --- a/SPTInstaller/Installer Tasks/IntializationTask.cs +++ b/SPTInstaller/Installer Tasks/IntializationTask.cs @@ -16,16 +16,7 @@ public class InitializationTask : InstallerTaskBase public override async Task TaskOperation() { - SetStatus("Initializing", $"Target Install Path: {FileHelper.GetRedactedPath(_data.TargetInstallPath)}"); - - _data.OriginalGamePath = PreCheckHelper.DetectOriginalGamePath(); - - if (_data.OriginalGamePath == null) - { - return Result.FromError("EFT IS NOT INSTALLED!"); - } - - SetStatus(null, $"Installed EFT Game Path: {FileHelper.GetRedactedPath(_data.OriginalGamePath)}"); + SetStatus("Initializing", $"Installed EFT Game Path: {FileHelper.GetRedactedPath(_data.OriginalGamePath)}"); var result = PreCheckHelper.DetectOriginalGameVersion(_data.OriginalGamePath); diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj index 7ae2630..2d1255e 100644 --- a/SPTInstaller/SPTInstaller.csproj +++ b/SPTInstaller/SPTInstaller.csproj @@ -9,8 +9,8 @@ icon.ico Assets\icon.ico Debug;Release;TEST - 2.3 - 2.3 + 2.4 + 2.4 diff --git a/SPTInstaller/ViewModels/PreChecksViewModel.cs b/SPTInstaller/ViewModels/PreChecksViewModel.cs index a448d55..aa55343 100644 --- a/SPTInstaller/ViewModels/PreChecksViewModel.cs +++ b/SPTInstaller/ViewModels/PreChecksViewModel.cs @@ -39,6 +39,12 @@ public class PreChecksViewModel : ViewModelBase } data.OriginalGamePath = PreCheckHelper.DetectOriginalGamePath(); + + if (data.OriginalGamePath == null) + { + NavigateTo(new MessageViewModel(HostScreen, Result.FromError("Could not find EFT install.\n\nDo you own and have the game installed?"))); + } + data.TargetInstallPath = Environment.CurrentDirectory; InstallPath = data.TargetInstallPath;