Updater removes all TShockAPI files from serverplugins folder in the event that somehow there are multiple copies.
Closes #56
This commit is contained in:
parent
8e9358a986
commit
a04b7a5547
1 changed files with 13 additions and 1 deletions
|
|
@ -55,7 +55,19 @@ namespace Update
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.Delete("serverplugins/TShockAPI.dll");
|
DirectoryInfo di = new DirectoryInfo("serverplugins");
|
||||||
|
FileInfo[] fi = di.GetFiles();
|
||||||
|
for (int i = 0; i < fi.Length; i ++ )
|
||||||
|
{
|
||||||
|
if (fi[i].Name.ToLowerInvariant().Contains("tshockapi"))
|
||||||
|
{
|
||||||
|
fi[i].Delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (System.IO.File.Exists("serverplugins/TShockAPI.dll"))
|
||||||
|
{
|
||||||
|
System.IO.File.Delete("serverplugins/TShockAPI.dll");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException)
|
catch (FileNotFoundException)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue