File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { postDataProvider } from '@/tree-view/provider/post-data-provider'
33import { LocalState } from '@/ctx/local-state'
44import { Uri } from 'vscode'
55import { WorkspaceCfg } from '@/ctx/cfg/workspace'
6+ import { r } from '@/infra/convert/string-literal'
67
78const validatePostFileMap = ( map : PostFileMap ) => map [ 0 ] >= 0 && map [ 1 ] !== ''
89export type PostFileMap = [ postId : number , filePath : string ]
@@ -94,8 +95,8 @@ export namespace PostFileMapManager {
9495 const filePath = x [ 1 ]
9596 if ( isUriPath ( filePath ) && filePath . indexOf ( oldWorkspaceUri . path ) >= 0 )
9697 x [ 1 ] = filePath . replace ( oldWorkspaceUri . path , newWorkspaceUri . path )
97- else if ( ! isUriPath ( filePath ) && filePath . indexOf ( oldWorkspaceUri . fsPath ) >= 0 )
98- x [ 1 ] = filePath . replace ( oldWorkspaceUri . fsPath , newWorkspaceUri . fsPath )
98+ else if ( ! isUriPath ( filePath ) && r ` filePath` . indexOf ( r ` oldWorkspaceUri.fsPath` ) >= 0 )
99+ x [ 1 ] = filePath . replace ( r ` ${ oldWorkspaceUri . fsPath } ` , r ` ${ newWorkspaceUri . fsPath } ` )
99100 } )
100101 }
101102}
You can’t perform that action at this time.
0 commit comments