Skip to content

Commit 8ece2bb

Browse files
kohaiycodexu
authored andcommitted
fix(#321): Windows 下查看默认工作区路径弹出文档文件夹问题 (#322)
1 parent cf6bd14 commit 8ece2bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/core/article/file/file-item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { useTranslations } from "next-intl";
1515
import useClipboardStore from "@/stores/clipboard";
1616
import { PhotoProvider, PhotoView } from "react-photo-view";
1717
import { convertImageByWorkspace } from "@/lib/utils";
18-
import { appDataDir } from '@tauri-apps/api/path';
18+
import { appDataDir, join } from '@tauri-apps/api/path';
1919

2020
export function FileItem({ item }: { item: DirTree }) {
2121
const [isEditing, setIsEditing] = useState(item.isEditing)
@@ -292,7 +292,7 @@ export function FileItem({ item }: { item: DirTree }) {
292292
} else {
293293
// 默认工作区 - 使用 AppData 目录
294294
const appDir = await appDataDir()
295-
open(`${appDir}/article${folderPath ? '/'+folderPath : ''}`)
295+
open(await join(appDir, 'article', folderPath))
296296
}
297297
}
298298

0 commit comments

Comments
 (0)