File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
src/BizHawk.Client.EmuHawk/movie Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -183,20 +183,14 @@ private string MakePath()
183
183
184
184
if ( ! string . IsNullOrWhiteSpace ( path ) )
185
185
{
186
- if ( path . LastIndexOf ( Path . DirectorySeparatorChar ) == - 1 )
187
- {
188
- if ( path [ 0 ] != Path . DirectorySeparatorChar )
189
- {
190
- path = path . Insert ( 0 , Path . DirectorySeparatorChar . ToString ( ) ) ;
191
- }
192
-
193
- path = _config . PathEntries . MovieAbsolutePath ( ) + path ;
186
+ path = Path . IsPathRooted ( path )
187
+ ? Path . GetFullPath ( path )
188
+ : Path . Combine ( _config . PathEntries . MovieAbsolutePath ( ) , path ) ;
194
189
195
- if ( ! MovieService . MovieExtensions . Contains ( Path . GetExtension ( path ) ) )
196
- {
197
- // If no valid movie extension, add movie extension
198
- path += $ ".{ MovieService . StandardMovieExtension } ";
199
- }
190
+ if ( ! MovieService . MovieExtensions . Select ( static ext => $ ".{ ext } ") . Contains ( Path . GetExtension ( path ) ) )
191
+ {
192
+ // If no valid movie extension, add movie extension
193
+ path += $ ".{ MovieService . StandardMovieExtension } ";
200
194
}
201
195
}
202
196
You can’t perform that action at this time.
0 commit comments