@@ -3,6 +3,7 @@ import * as path from 'path';
3
3
import { IAppConfigData } from '../../../shared/config/IAppConfigData' ;
4
4
import { PathInput } from '../config/PathInput' ;
5
5
import { Toggle } from '../config/Toggle' ;
6
+ import { isFlashpointValidCheck } from '../../../main/checkSanity' ;
6
7
7
8
export interface IConfigPageProps {
8
9
config : IAppConfigData ;
@@ -31,8 +32,8 @@ export class ConfigPage extends React.Component<IConfigPageProps, IConfigPageSta
31
32
< p className = "setting__title" > < b > FlashPoint Path:</ b > </ p >
32
33
</ div >
33
34
< div className = "setting__row flashpoint-path" >
34
- < PathInput defaultInput = { config . flashpointPath }
35
- onInputChange = { this . onFlashpointPathChange }
35
+ < PathInput defaultInput = { config . flashpointPath }
36
+ onInputChange = { this . onFlashpointPathChange }
36
37
isValid = { this . state . isFlashpointPathValid } />
37
38
</ div >
38
39
</ div >
@@ -48,10 +49,8 @@ export class ConfigPage extends React.Component<IConfigPageProps, IConfigPageSta
48
49
) ;
49
50
}
50
51
51
- onFlashpointPathChange ( filePath : string ) : void {
52
- // Check if the filepath points to a valid FlashPoint folder
53
- const xmlPath = path . join ( filePath , './Arcade/Data/Platforms/Flash.xml' ) ;
54
- const isValid = window . External . existsSync ( xmlPath ) ;
52
+ async onFlashpointPathChange ( filePath : string ) {
53
+ const isValid = await isFlashpointValidCheck ( filePath ) ;
55
54
this . setState ( { isFlashpointPathValid : isValid } ) ;
56
55
}
57
56
}
0 commit comments