Skip to content

Commit 802f4d3

Browse files
committed
+
1 parent 967aad9 commit 802f4d3

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

ChatLogger/AccountLogin.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,12 @@ static void OnFriendMsg(SteamFriends.FriendMsgCallback callback)
351351
string pathLog = Settingslist.PathLogs + @"\" + steamClient.SteamID.ConvertToUInt64() + FriendIDName;
352352

353353
string FinalMsg = "[" + DateTime.Now + "] " + FriendName + ": " + Message;
354-
354+
355+
if (!Directory.Exists(Settingslist.PathLogs + @"\" + steamClient.SteamID.ConvertToUInt64()))
356+
{
357+
Directory.CreateDirectory(Settingslist.PathLogs + @"\" + steamClient.SteamID.ConvertToUInt64());
358+
}
359+
355360
string[] files = Directory.GetFiles(Settingslist.PathLogs + @"\" + steamClient.SteamID.ConvertToUInt64(), "[" + FriendID + "]*.txt");
356361

357362
if (files.Length > 0)//file exist
@@ -394,8 +399,14 @@ static void OnFriendEchoMsg(SteamFriends.FriendMsgEchoCallback callback)
394399

395400

396401
string FinalMsg = "[" + DateTime.Now + "] " + steamFriends.GetPersonaName() + ": " + Message;
397-
string[] files = Directory.GetFiles(Settingslist.PathLogs + @"\" + steamClient.SteamID.ConvertToUInt64(), "["+FriendID+"]*.txt");
398402

403+
if (!Directory.Exists(Settingslist.PathLogs + @"\" + steamClient.SteamID.ConvertToUInt64()))
404+
{
405+
Directory.CreateDirectory(Settingslist.PathLogs + @"\" + steamClient.SteamID.ConvertToUInt64());
406+
}
407+
408+
string[] files = Directory.GetFiles(Settingslist.PathLogs + @"\" + steamClient.SteamID.ConvertToUInt64(), "["+FriendID+"]*.txt");
409+
399410
if (files.Length > 0)//file exist
400411
{
401412
string[] LastDate = File.ReadLines(files[0]).Last().Split(' '); LastDate[0] = LastDate[0].Substring(1);

0 commit comments

Comments
 (0)