Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
Fix bug when processing a plugin's name change
  • Loading branch information
Rookiestyle committed Jan 30, 2022
1 parent 37975d6 commit 5582cc9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/PluginUpdateInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,10 @@ private void ProcessRename()
List<string> lMsg = new List<string>();

lMsg.Add("Plugin update URL - old: " + PluginUpdateURL);
PluginUpdateURL = PluginUpdateURL.Replace(Name.ToLowerInvariant() + "/", NewName.ToLowerInvariant() + "/");
PluginUpdateURL = PluginUpdateURL.Replace(Name, NewName);
Regex reg = new Regex(@"\W");
string sNewNameCleaned = reg.Replace(NewName, string.Empty);
PluginUpdateURL = PluginUpdateURL.Replace(sNewNameCleaned.ToLowerInvariant() + "/", sNewNameCleaned.ToLowerInvariant() + "/");
PluginUpdateURL = PluginUpdateURL.Replace(Name, sNewNameCleaned);
lMsg.Add("Plugin update URL - new: " + PluginUpdateURL);

lMsg.Add("Plugin URL - old: " + URL);
Expand All @@ -788,7 +790,7 @@ private void ProcessRename()
{
lMsg.Add("Translation file - old: " + t.LangugageFile);
PluginUpdateHandler.DeleteSpecialFile(PluginUpdateHandler.PluginsTranslationsFolder + t.LangugageFile, false);
t.LangugageFile = t.LangugageFile.Replace(Name, NewName);
t.LangugageFile = t.LangugageFile.Replace(Name, sNewNameCleaned);
lMsg.Add("Translation file - new: " + t.LangugageFile);

//Decrease installed version to ensure the new file is downloaded
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyVersion("4.1.1.0")]
[assembly: AssemblyFileVersion("4.1.1.0")]
[assembly: Guid("672570AF-CC57-4980-86F9-D48FD1CC707D")]
2 changes: 1 addition & 1 deletion version.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:
Early update check:4.1
Early update check:4.1.1
Early update check!de:7
Early update check!ru:2
Early update check!fr:1
Expand Down

0 comments on commit 5582cc9

Please sign in to comment.