Skip to content

Commit

Permalink
more compact code for keeping folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
N00MKRAD committed Sep 27, 2020
1 parent d871b62 commit 5b0b552
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Code/Main/PostProcessingQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ public static async Task ProcessQueue ()
string suffixToRemove = "-" + Program.lastModelName.Replace(":", ".").Replace(">>", "+");
if (copyMode == CopyMode.KeepStructure)
{
string relPath = outFilename.Replace(Paths.imgOutPath, "");
string combinedPath = currentOutPath + relPath;
Logger.Log("combinedPath = " + combinedPath);
string combinedPath = currentOutPath + outFilename.Replace(Paths.imgOutPath, "");
Directory.CreateDirectory(combinedPath.GetParentDir());
File.Copy(outFilename, combinedPath.ReplaceInFilename(suffixToRemove, "", true));
}
Expand All @@ -123,9 +121,7 @@ public static async Task ProcessQueue ()
{
if (copyMode == CopyMode.KeepStructure)
{
string relPath = outFilename.Replace(Paths.imgOutPath, "");
string combinedPath = currentOutPath + relPath;
Logger.Log("combinedPath = " + combinedPath);
string combinedPath = currentOutPath + outFilename.Replace(Paths.imgOutPath, "");
Directory.CreateDirectory(combinedPath.GetParentDir());
File.Copy(outFilename, combinedPath, true);
}
Expand Down

0 comments on commit 5b0b552

Please sign in to comment.