Skip to content
This repository has been archived by the owner on Aug 7, 2022. It is now read-only.

Commit

Permalink
Fixed CopyDataFolder not careing about seperator chars
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Nov 28, 2019
1 parent d8239ac commit 6b8dc16
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion OMODFramework/Scripting/OBMMScriptHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,13 @@ private static void FunctionCopyDataFolder(IReadOnlyCollection<string> line)
case "True":
Directory.GetDirectories(from).Do(d =>
{
FunctionCopyDataFolder(new [] {"", d.Substring(DataFiles.Length), line.ElementAt(2) + d.Substring(DataFiles.Length + line.ElementAt(1).Length), "True"});
var arg2 = d.Substring(DataFiles.Length);
if (arg2.StartsWith("\\"))
arg2 = arg2.Substring(1);
var l = DataFiles.Length + line.ElementAt(1).Length;
var t = d.Substring(l);
var arg3 = line.ElementAt(2) + t;
FunctionCopyDataFolder(new [] {"", arg2, arg3, "True"});
});
break;
case "False":
Expand Down

0 comments on commit 6b8dc16

Please sign in to comment.