Skip to content

Commit

Permalink
Fix Folder Browser Dialog wrong check
Browse files Browse the repository at this point in the history
Fix Output Directory creation point
  • Loading branch information
Alkl58 committed Dec 21, 2021
1 parent 4d2b6b5 commit 9fe52a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
9 changes: 9 additions & 0 deletions NotEnoughAV1Encodes/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,15 @@ private async Task MainStartAsync(CancellationToken _cancelToken)
{
try
{
// Create Output Directory
try
{
if (!Directory.Exists(Path.GetDirectoryName(queueElement.VideoDB.OutputPath)))
{
Directory.CreateDirectory(Path.GetDirectoryName(queueElement.VideoDB.OutputPath));
}
}
catch { }
Directory.CreateDirectory(Path.Combine(Global.Temp, "NEAV1E", queueElement.UniqueIdentifier));
Global.Logger("==========================================================", queueElement.Output + ".log");
Global.Logger("INFO - Started Async Task - UID: " + queueElement.UniqueIdentifier, queueElement.Output + ".log");
Expand Down
9 changes: 0 additions & 9 deletions NotEnoughAV1Encodes/Video/VideoMuxer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ public void Concat(Queue.QueueElement queueElement)
FFmpegOutput = queueElement.VideoDB.OutputPath;
}

// Create Output Directory
try
{
if(!Directory.Exists(Path.GetDirectoryName(queueElement.VideoDB.OutputPath)))
{
Directory.CreateDirectory(Path.GetDirectoryName(queueElement.VideoDB.OutputPath));
}
} catch { }

// Muxing Chunks
Process processVideo = new();
ProcessStartInfo startInfo = new()
Expand Down
2 changes: 1 addition & 1 deletion NotEnoughAV1Encodes/Views/OpenSource.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private void ButtonOpenBatchFolder_Click(object sender, RoutedEventArgs e)
// Folder Input
System.Windows.Forms.FolderBrowserDialog openFolderDialog = new();
var result = openFolderDialog.ShowDialog();
if (result.ToString() != string.Empty)
if (result == System.Windows.Forms.DialogResult.OK)
{
Path = openFolderDialog.SelectedPath;
BatchFolder = true;
Expand Down

0 comments on commit 9fe52a1

Please sign in to comment.