public static void RemoveAndRestore()
{
if (!Installed)
return;
// Make sure we dont have a pending error here
if (Directory.Exists(StatsBackupPath))
Directory.Delete(StatsBackupPath, true);
// Backup the users new bf2s python files
Directory.Move(BF2Server.PythonPath, StatsBackupPath);
// Make sure we have a backup folder!!
if (!Directory.Exists(BackupPath))
{
// Copy over the default python files
DirectoryExt.Copy(Paths.DefaultPythonPath, BF2Server.PythonPath, true);
}
else
{
// Copy back the original contents
Directory.Move(BackupPath, BF2Server.PythonPath);
}
// Stop for a breather
System.Threading.Thread.Sleep(500);
}