File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -997,8 +997,12 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
997
997
const filePathNoWorkspaceArr = f . fsPath . replace ( workspacePath + path . sep , "" ) . split ( path . sep ) ;
998
998
const { folder, addCategory } = config ( "export" , workspace ) ;
999
999
const expectedFolder = typeof folder === "string" && folder . length ? folder : null ;
1000
- if ( expectedFolder !== null && filePathNoWorkspaceArr [ 0 ] === expectedFolder ) {
1001
- filePathNoWorkspaceArr . shift ( ) ;
1000
+ const expectedFolderArr = expectedFolder . split ( path . sep ) ;
1001
+ if (
1002
+ expectedFolder !== null &&
1003
+ filePathNoWorkspaceArr . slice ( 0 , expectedFolderArr . length ) . join ( path . sep ) === expectedFolder
1004
+ ) {
1005
+ filePathNoWorkspaceArr . splice ( 0 , expectedFolderArr . length ) ;
1002
1006
}
1003
1007
const expectedCat = addCategory ? getCategory ( f . fsPath , addCategory ) : null ;
1004
1008
if ( expectedCat !== null && filePathNoWorkspaceArr [ 0 ] === expectedCat ) {
You can’t perform that action at this time.
0 commit comments