Fix linux paths and types

This commit is contained in:
Pierre Jacquier
2024-04-02 05:02:32 -04:00
parent 0a3c68f5c0
commit 78de5da743
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ import { Extension } from '@codemirror/state'
import { LanguageSupport } from '@codemirror/language'
import { useNavigate } from 'react-router-dom'
import { paths } from 'lib/paths'
import { FileEntry } from '@tauri-apps/api/fs'
import { FileEntry } from 'lib/types'
const DEFAULT_FILE_NAME: string = 'main.kcl'

View File

@ -381,7 +381,7 @@ function getPaddedIdentifierRegExp() {
export async function getSettingsFilePath() {
const dir = await appConfigDir()
return dir + SETTINGS_FILE_NAME
return await join(dir, SETTINGS_FILE_NAME)
}
export async function writeToSettingsFile(
@ -397,7 +397,7 @@ export async function readSettingsFile(): Promise<ContextFrom<
typeof settingsMachine
> | null> {
const dir = await appConfigDir()
const path = dir + SETTINGS_FILE_NAME
const path = await join(dir, SETTINGS_FILE_NAME)
const dirExists = await exists(dir)
if (!dirExists) {
await mkdir(dir, { recursive: true })