File tree Expand file tree Collapse file tree
packages/tui/src/component Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { TextAttributes } from "@opentui/core"
22import { fileURLToPath } from "bun"
3+ import path from "path"
34import { useTheme } from "../context/theme"
45import { useDialog } from "../ui/dialog"
56import { useSync } from "../context/sync"
@@ -19,9 +20,9 @@ export function DialogStatus() {
1920 const result = list . map ( ( item ) => {
2021 const value = typeof item === "string" ? item : item [ 0 ]
2122 if ( value . startsWith ( "file://" ) ) {
22- const path = fileURLToPath ( value )
23- const parts = path . split ( "/" )
24- const filename = parts . pop ( ) || path
23+ const filePath = fileURLToPath ( value )
24+ const parts = filePath . split ( path . sep )
25+ const filename = parts . pop ( ) || filePath
2526 if ( ! filename . includes ( "." ) ) return { name : filename }
2627 const basename = filename . split ( "." ) [ 0 ]
2728 if ( basename === "index" ) {
You can’t perform that action at this time.
0 commit comments