Unstable 1.1.14.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user