mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
If game folder files exist, ignore the game folder
This commit is contained in:
parent
e38d67fee1
commit
324ddae397
@ -1,5 +1,6 @@
|
|||||||
using Compression.BSA;
|
using Compression.BSA;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@ -159,9 +160,19 @@ namespace Wabbajack.Lib
|
|||||||
.Where(p => p.FileExists())
|
.Where(p => p.FileExists())
|
||||||
.Select(p => new RawSourceFile(VFS.Index.ByRootPath[p], p.RelativeTo(MO2Folder)));
|
.Select(p => new RawSourceFile(VFS.Index.ByRootPath[p], p.RelativeTo(MO2Folder)));
|
||||||
|
|
||||||
var gameFiles = Directory.EnumerateFiles(GamePath, "*", SearchOption.AllDirectories)
|
// If Game Folder Files exists, ignore the game folder
|
||||||
|
IEnumerable<RawSourceFile> gameFiles;
|
||||||
|
if (!Directory.Exists(Path.Combine(MO2Folder, Consts.GameFolderFilesDir)))
|
||||||
|
{
|
||||||
|
gameFiles = Directory.EnumerateFiles(GamePath, "*", SearchOption.AllDirectories)
|
||||||
.Where(p => p.FileExists())
|
.Where(p => p.FileExists())
|
||||||
.Select(p => new RawSourceFile(VFS.Index.ByRootPath[p], Path.Combine(Consts.GameFolderFilesDir, p.RelativeTo(GamePath))));
|
.Select(p => new RawSourceFile(VFS.Index.ByRootPath[p],
|
||||||
|
Path.Combine(Consts.GameFolderFilesDir, p.RelativeTo(GamePath))));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gameFiles = new List<RawSourceFile>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ModMetas = Directory.EnumerateDirectories(Path.Combine(MO2Folder, "mods"))
|
ModMetas = Directory.EnumerateDirectories(Path.Combine(MO2Folder, "mods"))
|
||||||
|
Loading…
Reference in New Issue
Block a user