check if InstalledBundles dir exists

This commit is contained in:
MountainFlash
2022-05-19 13:06:32 +05:30
parent 8c706646ed
commit c3027d2102

View File

@@ -119,11 +119,10 @@ namespace FModel.ViewModels
break;
}
case FGame.FortniteGame:
Provider = new DefaultFileProvider(new DirectoryInfo(gameDirectory), new List<DirectoryInfo>
{
new(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\FortniteGame\\Saved\\PersistentDownloadDir\\InstalledBundles"),
},
SearchOption.AllDirectories, true, versions);
var extraDirs = new List<DirectoryInfo>();
var bundlesDir = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\FortniteGame\\Saved\\PersistentDownloadDir\\InstalledBundles");
if (bundlesDir.Exists) extraDirs.Add(bundlesDir);
Provider = new DefaultFileProvider(new DirectoryInfo(gameDirectory), extraDirs, SearchOption.AllDirectories, true, versions);
break;
case FGame.Unknown when UserSettings.Default.ManualGames.TryGetValue(gameDirectory, out var settings):
{