mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixed manual game file detection for files within archive within an archive
This commit is contained in:
parent
d2a80b25c6
commit
6aeb5f80ff
@ -177,7 +177,7 @@ namespace Wabbajack.Lib
|
||||
continue;
|
||||
|
||||
IndexedArchive targetArchive = null;
|
||||
IndexedArchives.Where(a => a.File.Children.Contains(element)).Do(a => targetArchive = a);
|
||||
IndexedArchives.Where(a => a.File.ThisAndAllChildren.Contains(element)).Do(a => targetArchive = a);
|
||||
|
||||
if (targetArchive == null)
|
||||
continue;
|
||||
@ -192,7 +192,7 @@ namespace Wabbajack.Lib
|
||||
var replace = f;
|
||||
var name = replace.File.Name;
|
||||
var archiveName = targetArchive.Name;
|
||||
var elementPath = element.FullPath.Substring(element.FullPath.IndexOf('|')+1);
|
||||
var elementPath = element.FullPath.Substring(element.FullPath.LastIndexOf('|')+1);
|
||||
var gameToFile = name.Substring(GamePath.Length + 1).Replace(elementPath, "");
|
||||
if (gameToFile.EndsWith("\\"))
|
||||
gameToFile = gameToFile.Substring(0, gameToFile.Length - 1);
|
||||
@ -390,7 +390,7 @@ namespace Wabbajack.Lib
|
||||
ActiveArchives.Add(Path.GetFileNameWithoutExtension(f));
|
||||
});
|
||||
|
||||
if (lines.Any(line => line.Contains("directURL=")))
|
||||
if (lines.Any(line => line.Contains("directURL=")) && !ActiveArchives.Contains(Path.GetFileNameWithoutExtension(f)))
|
||||
{
|
||||
Utils.Log($"File {f} appears to not come from the Nexus, adding to ActiveArchives");
|
||||
ActiveArchives.Add(Path.GetFileNameWithoutExtension(f));
|
||||
|
Loading…
Reference in New Issue
Block a user