File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {
1313} from "./deps.ts" ;
1414
1515interface UntarOptions {
16- ignore ?: ( entryName : string ) => boolean ;
16+ ignore ?: ( path : string ) => boolean ;
1717 normalize ?( entry : TarEntry [ ] ) : TarEntry [ ] ;
1818}
1919
@@ -31,10 +31,10 @@ export async function untar(
3131 }
3232 for ( const entry of entrys ) {
3333 const { fileName, type } = entry ;
34- if ( options ?. ignore && options ?. ignore ( fileName ) ) {
34+ const path = join ( output , fileName ) ;
35+ if ( options ?. ignore && options ?. ignore ( path ) ) {
3536 continue ;
3637 }
37- const path = join ( output , fileName ) ;
3838 if ( type === "directory" ) {
3939 await ensureDir ( path ) ;
4040 paths . push ( path ) ;
@@ -50,7 +50,7 @@ export async function untar(
5050}
5151
5252interface UnzipOptions {
53- ignore ?: ( entryName : string ) => boolean ;
53+ ignore ?: ( path : string ) => boolean ;
5454 /**
5555 * @default false
5656 */
@@ -84,10 +84,10 @@ export async function unzip(
8484 ) ;
8585
8686 const promises = newEntrys . map ( async ( entry ) => {
87- if ( ignore ( entry . filename ) ) {
87+ const path = join ( output , entry . filename ) ;
88+ if ( ignore ( path ) ) {
8889 return ;
8990 }
90- const path = join ( output , entry . filename ) ;
9191 paths . push ( path ) ;
9292 if ( entry . directory ) {
9393 await ensureDir ( path ) ;
You can’t perform that action at this time.
0 commit comments