@@ -748,7 +748,7 @@ export function initializeIFSBrowser(context: vscode.ExtensionContext) {
748
748
const remoteFilepath = path . join ( ibmi . getLastDownloadLocation ( ) , path . basename ( node . path ) ) ;
749
749
downloadLocation = ( await vscode . window . showSaveDialog ( {
750
750
defaultUri : vscode . Uri . file ( remoteFilepath ) ,
751
- filters : { 'Streamfile' : [ extname ( node . path ) || '*' ] }
751
+ filters : { 'Streamfile' : [ extname ( node . path ) . substring ( 1 ) || '*' ] }
752
752
} ) ) ?. path ;
753
753
}
754
754
@@ -760,7 +760,7 @@ export function initializeIFSBrowser(context: vscode.ExtensionContext) {
760
760
for ( const item of items ) {
761
761
const targetPath = item . path ;
762
762
task . report ( { message : targetPath , increment } ) ;
763
- if ( saveIntoDirectory ) {
763
+ if ( saveIntoDirectory ) {
764
764
const target = path . join ( Tools . fixWindowsPath ( downloadLocation ! ) , path . basename ( targetPath ) ) ;
765
765
if ( item . file . type === "directory" ) {
766
766
let proceed = ! existsSync ( target ) ;
@@ -782,7 +782,7 @@ export function initializeIFSBrowser(context: vscode.ExtensionContext) {
782
782
}
783
783
}
784
784
}
785
- else {
785
+ else {
786
786
await ibmi . downloadFile ( downloadLocation ! , targetPath ) ;
787
787
}
788
788
}
@@ -871,6 +871,6 @@ async function showOpenDialog() {
871
871
/**
872
872
* Filters the content of an IFSItem array to keep only items whose parent are not in the array
873
873
*/
874
- function reduceIFSPath ( item : IFSItem , index : number , array : IFSItem [ ] ) {
875
- return ! array . filter ( i => i . file . type === "directory" && i !== item ) . some ( folder => item . file . path . startsWith ( folder . file . path ) ) ;
874
+ function reduceIFSPath ( item : IFSItem , index : number , array : IFSItem [ ] ) {
875
+ return ! array . filter ( i => i . file . type === "directory" && i !== item ) . some ( folder => item . file . path . startsWith ( folder . file . path ) ) ;
876
876
}
0 commit comments