Fixed files with the word "Game" due to FortnitePath, eg: SPID_051_GameOver.

This commit is contained in:
MaikyM 2019-11-16 01:25:26 -06:00
parent 98f958510d
commit e51ff6d7e2

View File

@ -1,6 +1,7 @@
using System;
using System;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
using FProp = FModel.Properties.Settings;
namespace FModel.Methods.Utilities
@ -91,7 +92,8 @@ namespace FModel.Methods.Utilities
public static string FixFortnitePath(string path)
{
string fixedPath = path.Replace("Game", "FortniteGame/Content");
Regex regexGame = new Regex(Regex.Escape("Game"));
string fixedPath = regexGame.Replace(path, "FortniteGame/Content", 1);
int sep = fixedPath.LastIndexOf('.');
return fixedPath.Substring(0, sep > 0 ? sep : fixedPath.Length);
}