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> {
997997 const filePathNoWorkspaceArr = f . fsPath . replace ( workspacePath + path . sep , "" ) . split ( path . sep ) ;
998998 const { folder, addCategory } = config ( "export" , workspace ) ;
999999 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 ) ;
10021006 }
10031007 const expectedCat = addCategory ? getCategory ( f . fsPath , addCategory ) : null ;
10041008 if ( expectedCat !== null && filePathNoWorkspaceArr [ 0 ] === expectedCat ) {
You can’t perform that action at this time.
0 commit comments