mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Removed unnecessary compiler instantiation for setting downloads folder
This commit is contained in:
parent
3a15d62289
commit
df62c2ff8c
@ -55,11 +55,13 @@ namespace Wabbajack.Lib
|
||||
if (MO2Ini.Settings != null)
|
||||
if (MO2Ini.Settings.download_directory != null)
|
||||
return MO2Ini.Settings.download_directory.Replace("/", "\\");
|
||||
return Path.Combine(MO2Folder, "downloads");
|
||||
return GetTypicalDownloadsFolder(MO2Folder);
|
||||
}
|
||||
set => _mo2DownloadsFolder = value;
|
||||
}
|
||||
|
||||
public static string GetTypicalDownloadsFolder(string mo2Folder) => Path.Combine(mo2Folder, "downloads");
|
||||
|
||||
public string MO2ProfileDir => Path.Combine(MO2Folder, "profiles", MO2Profile);
|
||||
|
||||
internal UserStatus User { get; private set; }
|
||||
|
@ -182,20 +182,9 @@ namespace Wabbajack
|
||||
.FilterSwitch(
|
||||
this.WhenAny(x => x.DownloadLocation.Exists)
|
||||
.Invert())
|
||||
.Subscribe(x =>
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var tmpCompiler = new MO2Compiler(
|
||||
mo2Folder: Mo2Folder,
|
||||
mo2Profile: null,
|
||||
outputFile: null);
|
||||
DownloadLocation.TargetPath = tmpCompiler.MO2DownloadsFolder;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.Log($"Error setting default download location {ex}");
|
||||
}
|
||||
DownloadLocation.TargetPath = MO2Compiler.GetTypicalDownloadsFolder(Mo2Folder);
|
||||
})
|
||||
.DisposeWith(CompositeDisposable);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user