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'
3
3
import { LocalState } from '@/ctx/local-state'
4
4
import { Uri } from 'vscode'
5
5
import { WorkspaceCfg } from '@/ctx/cfg/workspace'
6
+ import { r } from '@/infra/convert/string-literal'
6
7
7
8
const validatePostFileMap = ( map : PostFileMap ) => map [ 0 ] >= 0 && map [ 1 ] !== ''
8
9
export type PostFileMap = [ postId : number , filePath : string ]
@@ -94,8 +95,8 @@ export namespace PostFileMapManager {
94
95
const filePath = x [ 1 ]
95
96
if ( isUriPath ( filePath ) && filePath . indexOf ( oldWorkspaceUri . path ) >= 0 )
96
97
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 } ` )
99
100
} )
100
101
}
101
102
}
You can’t perform that action at this time.
0 commit comments