Skip to content

Commit 461d380

Browse files
authored
Merge pull request #251 from cnblogs/fix-post-file-path-check
fix: post file path check
2 parents cfda8a2 + 86938bf commit 461d380

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { postCategoryDataProvider } from '@/tree-view/provider/post-category-tre
22
import { postDataProvider } from '@/tree-view/provider/post-data-provider'
33
import { LocalState } from '@/ctx/local-state'
44
import { Uri } from 'vscode'
5-
import { WorkspaceCfg } from '@/ctx/cfg/workspace'
65

76
const validatePostFileMap = (map: PostFileMap) => map[0] >= 0 && map[1] !== ''
87

@@ -70,7 +69,6 @@ export namespace PostFileMapManager {
7069
if (map === undefined) return
7170
const path = map[1]
7271
if (path === '') return
73-
if (path.indexOf(WorkspaceCfg.getWorkspaceUri().path) < 0) return
7472
return path.startsWith('/') ? Uri.parse(path).fsPath : path
7573
}
7674

0 commit comments

Comments
 (0)