Dont allow identical paths (#2362)

* add check for identical download and install folder paths

* changelog update
This commit is contained in:
JanuarySnow 2023-07-16 22:20:49 +01:00 committed by GitHub
parent 00faee48fe
commit c57219dc37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@
#### Version TBD
* Fixed issues related to high RAM usage
* The resumable downloads now reserve drive space to write to in advance instead of being managed in system RAM
* Added check for identical download and install paths
#### Version - 3.1.0.0 - 5/7/2023
* Fixed Readme opening twice

View File

@ -273,7 +273,10 @@ public class InstallerVM : BackNavigatingVM, IBackNavigatingVM, ICpuStatusVM
yield return ErrorResponse.Fail("Install path isn't set to a folder");
if (installPath.InFolder(KnownFolders.Windows))
yield return ErrorResponse.Fail("Don't install modlists into your Windows folder");
if( installPath.ToString().Length > 0 && downloadPath.ToString().Length > 0 && installPath == downloadPath)
{
yield return ErrorResponse.Fail("Can't have identical install and download folders");
}
foreach (var game in GameRegistry.Games)
{
if (!_gameLocator.TryFindLocation(game.Key, out var location))