Skip to content

Commit 47040a8

Browse files
committed
fix: get file path from post-file map
1 parent d8928ac commit 47040a8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/service/post/post-file-map.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ export namespace PostFileMapManager {
6767
export function getFilePath(postId: number) {
6868
const map = findByPostId(postId)
6969
if (map === undefined) return
70-
if (map[1] === '') return
71-
return map[1]
70+
const path = map[1]
71+
if (path === '') return
72+
return path.startsWith('/') ? Uri.parse(path).fsPath : path
7273
}
7374

7475
export function getPostId(filePath: string) {

0 commit comments

Comments
 (0)