Skip to content

Commit d47fd6b

Browse files
committed
av1an: Try to create output dir if it does not yet exist
1 parent d275bb0 commit d47fd6b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ff-utils-winforms/UI/Tasks/Av1an.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,17 @@ public static async Task Run(bool resume = false, string overrideTempDir = "", s
146146
args = form.Args;
147147
}
148148

149+
try
150+
{
151+
Directory.CreateDirectory(Path.GetDirectoryName(outPath));
152+
}
153+
catch (Exception e)
154+
{
155+
Logger.Log($"Failed to create output folder: {e.Message}");
156+
Program.mainForm.SetWorking(false);
157+
return;
158+
}
159+
149160
Logger.Log($"Running:\nav1an {args}", true, false, "av1an");
150161

151162
await AvProcess.RunAv1an(args, AvProcess.LogMode.OnlyLastLine, true);

0 commit comments

Comments
 (0)