Skip to content

Commit

Permalink
Fix screenshot folder check
Browse files Browse the repository at this point in the history
  • Loading branch information
josdemmers committed Mar 29, 2024
1 parent 48f485a commit 95f288f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion D4Companion.Helpers/ScreenCapture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static void WriteBitmapToFile(string filename, Bitmap? bitmap)
{
// Check folder
string folder = new FileInfo(filename)?.Directory?.FullName ?? string.Empty;
if (!Directory.Exists(folder) && string.IsNullOrWhiteSpace(folder)) Directory.CreateDirectory(folder);
if (!Directory.Exists(folder) && !string.IsNullOrWhiteSpace(folder)) Directory.CreateDirectory(folder);

// Use the OpenCv save function instead
// https://stackoverflow.com/questions/52100703/bug-in-windows-nets-system-drawing-savestream-imageformat-corrupt-png-pro
Expand Down

0 comments on commit 95f288f

Please sign in to comment.