Fix yarn builds with a couple of shortcuts

This commit is contained in:
Pierre Jacquier
2024-02-07 07:06:26 -05:00
parent 6b835d5149
commit 6deac3f388
13 changed files with 1670 additions and 731 deletions

View File

@ -17,7 +17,7 @@ import {
mkdir,
remove,
rename,
writeFile,
create,
} from '@tauri-apps/plugin-fs'
import { FILE_EXT, readProject } from 'lib/tauriFS'
import { isTauri } from 'lib/isTauri'
@ -84,12 +84,11 @@ export const FileMachineProvider = ({
if (event.data.makeDir) {
await mkdir(context.selectedDirectory.path + sep() + name)
} else {
await writeFile(
await create(
context.selectedDirectory.path +
sep() +
name +
(name.endsWith(FILE_EXT) ? '' : FILE_EXT),
''
)
}