File tree 1 file changed +22
-2
lines changed
BizHawk.Client.EmuHawk/movie
1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -150,10 +150,30 @@ private void Cancel_Click(object sender, EventArgs e)
150
150
}
151
151
152
152
private void BrowseBtn_Click ( object sender , EventArgs e )
153
- {
153
+ {
154
+ string movieFolderPath = PathManager . MakeAbsolutePath ( Global . Config . PathEntries . MoviesPathFragment , null ) ;
155
+
156
+ // Create movie folder if it doesn't already exist
157
+ try
158
+ {
159
+ if ( ! Directory . Exists ( movieFolderPath ) )
160
+ {
161
+ Directory . CreateDirectory ( movieFolderPath ) ;
162
+ }
163
+ }
164
+ catch ( Exception movieDirException )
165
+ when (
166
+ movieDirException is IOException ||
167
+ movieDirException is UnauthorizedAccessException ||
168
+ movieDirException is PathTooLongException
169
+ )
170
+ {
171
+ //TO DO : Pass error to user?
172
+ }
173
+
154
174
var sfd = new SaveFileDialog
155
175
{
156
- InitialDirectory = PathManager . MakeAbsolutePath ( Global . Config . PathEntries . MoviesPathFragment , null ) ,
176
+ InitialDirectory = movieFolderPath ,
157
177
DefaultExt = "." + Global . MovieSession . Movie . PreferredExtension ,
158
178
FileName = RecordBox . Text ,
159
179
OverwritePrompt = false ,
You can’t perform that action at this time.
0 commit comments