mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 07:34:36 +01:00
remove empty resources in case of dry launch
This commit is contained in:
@@ -73,7 +73,9 @@ export default class Downloads extends React.Component<IProps, IState> {
|
||||
if (gc_path) {
|
||||
const resources_exist: boolean = await invoke('dir_exists', {
|
||||
path: path + '\\resources'
|
||||
})
|
||||
}) as boolean && !(await invoke('dir_is_empty', {
|
||||
path: path + '\\resources'
|
||||
})) as boolean
|
||||
|
||||
this.setState({
|
||||
grasscutter_set: gc_path !== '',
|
||||
@@ -153,7 +155,7 @@ export default class Downloads extends React.Component<IProps, IState> {
|
||||
if (await invoke('dir_exists', {
|
||||
path: folder + '\\resources'
|
||||
})) {
|
||||
await invoke('delete_dir', {
|
||||
await invoke('dir_delete', {
|
||||
path: folder + '\\resources'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user