Record Dialog - Fix crash when movie folder does not already exist
This commit is contained in:
parent
4ff34a081b
commit
893a8b16e5
|
@ -139,6 +139,12 @@ namespace BizHawk.Client.Common
|
|||
|
||||
private void Write(string fn)
|
||||
{
|
||||
var file = new FileInfo(fn);
|
||||
if (!file.Directory.Exists)
|
||||
{
|
||||
Directory.CreateDirectory(file.Directory.ToString());
|
||||
}
|
||||
|
||||
using (var fs = new FileStream(fn, FileMode.Create, FileAccess.Write))
|
||||
using (var bs = new BinaryStateSaver(fs, false))
|
||||
{
|
||||
|
|
|
@ -124,6 +124,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
.GetCustomAttribute(Global.Emulator.GetType(), typeof(CoreAttributes)))
|
||||
.CoreName;
|
||||
|
||||
movieToRecord.Save();
|
||||
GlobalWin.MainForm.StartNewMovie(movieToRecord, true);
|
||||
|
||||
Global.Config.UseDefaultAuthor = DefaultAuthorCheckBox.Checked;
|
||||
|
|
Loading…
Reference in New Issue