mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-16 00:54:40 +01:00
Fix paths
Replaced backslashes in paths with slashes. I did not touch function that do the same with paths. Those can be removed manually. Also dataDir() returns a path that ends with a slash so I got rid of duplicated slashes.
This commit is contained in:
@@ -240,7 +240,7 @@ export default class Options extends React.Component<IProps, IState> {
|
||||
|
||||
if (!isUrl) {
|
||||
const filename = value.replace(/\\/g, '/').split('/').pop()
|
||||
const localBgPath = ((await dataDir()) as string).replace(/\\/g, '/')
|
||||
const localBgPath = (await dataDir()).replace(/\\/g, '/')
|
||||
|
||||
await setConfigOption('custom_background', `${localBgPath}/cultivation/bg/${filename}`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user