From 05f11f2ced9926d9250205b48d61c57b6292dbb3 Mon Sep 17 00:00:00 2001 From: Bitl Date: Thu, 25 Mar 2021 18:39:58 -0700 Subject: [PATCH] remove everything after the - --- Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs index 3528a2b..00213b7 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs @@ -1027,7 +1027,9 @@ public class GlobalFuncs { if (dir.Contains(terms) && !dir.Contains("_default")) { - FixedFileCopy(dir, Settings.GraphicsOptions.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + Path.GetFileName(dir).Replace(terms, "").Replace("-Shaders", ""), true); + FixedFileCopy(dir, Settings.GraphicsOptions.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + Path.GetFileName(dir).Replace(terms, "") + .Replace(dir.Substring(dir.LastIndexOf('-') + 1), "") + .Replace("-", ".xml"), true); } } } @@ -1153,7 +1155,9 @@ public class GlobalFuncs finally { doc.Save(dir); - FixedFileCopy(dir, Settings.GraphicsOptions.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + Path.GetFileName(dir).Replace(terms, "").Replace("-Shaders", ""), true); + FixedFileCopy(dir, Settings.GraphicsOptions.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + Path.GetFileName(dir).Replace(terms, "") + .Replace(dir.Substring(dir.LastIndexOf('-') + 1), "") + .Replace("-", ".xml"), true); } } }