Unstable 1.1.14.0

This commit is contained in:
Markus Isberg
2023-10-02 16:43:54 +03:00
parent 94f5a93a0c
commit cf8f0de659
606 changed files with 21906 additions and 11456 deletions
@@ -613,7 +613,8 @@ namespace Barotrauma.Steam
public static async Task CopyDirectory(string fileListDir, string modName, string from, string to, ShouldCorrectPaths shouldCorrectPaths)
{
from = Path.GetFullPath(from); to = Path.GetFullPath(to);
from = Path.GetFullPath(from);
to = Path.GetFullPath(to);
Directory.CreateDirectory(to);
string convertFromTo(string from)
@@ -623,10 +624,16 @@ namespace Barotrauma.Steam
string[] subDirs = Directory.GetDirectories(from);
foreach (var file in files)
{
//ignore hidden files
if (Path.GetFileName(file).StartsWith('.')) { continue; }
await CopyFile(fileListDir, modName, file, convertFromTo(file), shouldCorrectPaths);
}
foreach (var dir in subDirs) { await CopyDirectory(fileListDir, modName, dir, convertFromTo(dir), shouldCorrectPaths); }
foreach (var dir in subDirs)
{
if (Path.GetFileName(dir) is { } dirName && dirName.StartsWith('.')) { continue; }
await CopyDirectory(fileListDir, modName, dir, convertFromTo(dir), shouldCorrectPaths);
}
}
}
}