Skip to content

Commit

Permalink
Hotfix for a null reference error during single-file translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Taicanium committed Mar 11, 2024
1 parent df0fe5c commit dada2a4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions MessagePool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,10 @@ private static bool TranslateMessage(FileStream srcFS, StreamWriter dstFS)
}

string newDir = Path.Combine(Path.GetDirectoryName(destFile) ?? "C:", Path.GetFileNameWithoutExtension(destFile) ?? "UNKNOWN");
writtenDirectories.Add(newDir);

if (writtenDirectories is not null)
writtenDirectories.Add(newDir);

if (!Directory.Exists(newDir))
Directory.CreateDirectory(newDir);

Expand Down Expand Up @@ -485,7 +488,7 @@ private static bool TranslateMessage(FileStream srcFS, StreamWriter dstFS)

if (!Common.plaintext)
{
messageData.Add( "<a class=\"pf\" href=\"https://f-list.net/c/"
messageData.Add("<a class=\"pf\" href=\"https://f-list.net/c/"
+ profileName
+ "\"><img class=\"av\" src=\"https://static.f-list.net/images/avatar/"
+ profileName.ToLower()
Expand Down

0 comments on commit dada2a4

Please sign in to comment.