diff --git a/MessagePool.cs b/MessagePool.cs index 3eaa6b8..189a608 100644 --- a/MessagePool.cs +++ b/MessagePool.cs @@ -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); @@ -485,7 +488,7 @@ private static bool TranslateMessage(FileStream srcFS, StreamWriter dstFS) if (!Common.plaintext) { - messageData.Add( "