From 91f5733662fba68f89f5eba59eea585e2ee7b759 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 30 Mar 2012 00:32:45 +0000 Subject: [PATCH] Record movie dialog - if file already exists, confirm overwrite --- BizHawk.MultiClient/RecordMovie.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/BizHawk.MultiClient/RecordMovie.cs b/BizHawk.MultiClient/RecordMovie.cs index fe7d2ff0ca..9d637b3a63 100644 --- a/BizHawk.MultiClient/RecordMovie.cs +++ b/BizHawk.MultiClient/RecordMovie.cs @@ -50,6 +50,15 @@ namespace BizHawk.MultiClient if (path.Length > 0) { + FileInfo test = new FileInfo(path); + if (test.Exists) + { + var result = MessageBox.Show(path + " already exists, overwrite?", "Confirm overwrite", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); + if (result == System.Windows.Forms.DialogResult.Cancel) + return; + } + + MovieToRecord = new Movie(path, MOVIEMODE.RECORD); //Header