Fix path splitting issues on windows (#3565)
* Fix path splitting issues on windows * Fix path splitting issue on routeLoaders * Enable some e2e tests * Swap enabled e2e tests * Working bare-min project parse * Make tsc happy * Clean up & enable more tests * Fix paths in browser * Fix tests for windows fmt * Clean up wasm side * Make build:wasm windows compatible * More paths cleanup & some tests * Remove sleep * Use new config sturcture in parseroute * Clean up debugger * Fix: on settings close go back to the same file (#3549) * Fix: on settings close go back to the same file * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * shit aint working yo * Get that page a-loading * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> * Fmt * Comment out currently failing win32 tests * Ignore tsc for electron monkey-patch * Force line-endings to only * Fix tsc * Enable more tests * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Avoid modifying global for tests --------- Co-authored-by: 49fl <ircsurfer33@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
This commit is contained in:
@ -19,7 +19,6 @@ import {
|
||||
import { DeepPartial } from './types'
|
||||
import { ProjectConfiguration } from 'wasm-lib/kcl/bindings/ProjectConfiguration'
|
||||
import { Configuration } from 'wasm-lib/kcl/bindings/Configuration'
|
||||
export { parseProjectRoute } from 'lang/wasm'
|
||||
|
||||
export async function renameProjectDirectory(
|
||||
projectPath: string,
|
||||
@ -39,7 +38,7 @@ export async function renameProjectDirectory(
|
||||
|
||||
// Make sure the new name does not exist.
|
||||
const newPath = window.electron.path.join(
|
||||
projectPath.split('/').slice(0, -1).join('/'),
|
||||
window.electron.path.dirname(projectPath),
|
||||
newName
|
||||
)
|
||||
try {
|
||||
@ -186,9 +185,9 @@ const collectAllFilesRecursiveFrom = async (path: string) => {
|
||||
return Promise.reject(new Error(`Path ${path} is not a directory`))
|
||||
}
|
||||
|
||||
const pathParts = path.split(window.electron.path.sep)
|
||||
const name = window.electron.path.basename(path)
|
||||
let entry: FileEntry = {
|
||||
name: pathParts.slice(-1)[0],
|
||||
name: name,
|
||||
path,
|
||||
children: [],
|
||||
}
|
||||
@ -330,7 +329,6 @@ export async function getProjectInfo(projectPath: string): Promise<Project> {
|
||||
new Error(`Project path is not a directory: ${projectPath}`)
|
||||
)
|
||||
}
|
||||
|
||||
let walked = await collectAllFilesRecursiveFrom(projectPath)
|
||||
let default_file = await getDefaultKclFileForDir(projectPath, walked)
|
||||
const metadata = await window.electron.stat(projectPath)
|
||||
|
Reference in New Issue
Block a user