@@ -429,8 +429,10 @@ private async void ChangeSettingsAction()
429429 bool overwrite = false ;
430430 bool forceRestart = false ;
431431
432+ string [ ] filesTargedLocation = Directory . GetFiles ( LocationSelectedPath ) ;
433+
432434 // Check if there are any settings files in the folder...
433- if ( FilesContainsSettingsFiles ( Directory . GetFiles ( LocationSelectedPath ) ) )
435+ if ( FilesContainsSettingsFiles ( filesTargedLocation ) )
434436 {
435437 MetroDialogSettings settings = AppearanceManager . MetroDialog ;
436438
@@ -459,7 +461,7 @@ private async void ChangeSettingsAction()
459461 // Try moving files (permissions, file is in use...)
460462 try
461463 {
462- await SettingsManager . MoveSettingsAsync ( SettingsManager . GetSettingsLocation ( ) , LocationSelectedPath , overwrite ) ;
464+ await SettingsManager . MoveSettingsAsync ( SettingsManager . GetSettingsLocation ( ) , LocationSelectedPath , overwrite , filesTargedLocation ) ;
463465
464466 Properties . Settings . Default . Settings_CustomSettingsLocation = LocationSelectedPath ;
465467
@@ -468,7 +470,11 @@ private async void ChangeSettingsAction()
468470 }
469471 catch ( Exception ex )
470472 {
471- await dialogCoordinator . ShowMessageAsync ( this , LocalizationManager . GetStringByKey ( "String_Header_Error" ) as string , ex . Message , MessageDialogStyle . Affirmative , AppearanceManager . MetroDialog ) ;
473+ MetroDialogSettings settings = AppearanceManager . MetroDialog ;
474+
475+ settings . AffirmativeButtonText = LocalizationManager . GetStringByKey ( "String_Button_OK" ) ;
476+
477+ await dialogCoordinator . ShowMessageAsync ( this , LocalizationManager . GetStringByKey ( "String_Header_Error" ) as string , ex . Message , MessageDialogStyle . Affirmative , settings ) ;
472478 }
473479
474480 LocationSelectedPath = string . Empty ;
0 commit comments