@@ -32,7 +32,7 @@ class SftpClient {
3232 this . #hostname = hostname ;
3333 this . #port = port ;
3434 this . #username = username ;
35- this . #authenticationType = ! ! authentication . keyFile ? "key" : "password" ;
35+ this . #authenticationType = authentication . keyFile ? "key" : "password" ;
3636 this . #keyFile = authentication . keyFile ;
3737 this . #passPhrase = authentication . passPhrase ;
3838 this . #password = authentication . password ;
@@ -78,13 +78,13 @@ class SftpClient {
7878 sftp . lsDir (
7979 path ,
8080 ( res ) => {
81- res . forEach ( ( file ) => {
81+ for ( const file of res ) {
8282 file . url = Url . join ( this . #base, file . url ) ;
8383 file . type = mimeType . lookup ( filename ) ;
8484 if ( file . isLink ) {
8585 file . linkTarget = Url . join ( this . #base, file . linkTarget ) ;
8686 }
87- } ) ;
87+ }
8888 resolve ( res ) ;
8989 } ,
9090 ( err ) => {
@@ -357,8 +357,8 @@ class SftpClient {
357357 await this . #setStat( ) ;
358358 sftp . rm (
359359 this . #safeName( filename ) ,
360- this . #stat. isDirectory ? true : false ,
361- this . #stat. isDirectory ? true : false ,
360+ this . #stat. isDirectory ,
361+ this . #stat. isDirectory ,
362362 ( _res ) => {
363363 resolve ( fullFilename ) ;
364364 } ,
@@ -565,7 +565,7 @@ class SftpClient {
565565 #getLocalname( filename ) {
566566 return Url . join (
567567 CACHE_STORAGE ,
568- " sftp" + Url . join ( this . #base, filename ) . hashCode ( ) ,
568+ ` sftp${ Url . join ( this . #base, filename ) . hashCode ( ) } ` ,
569569 ) ;
570570 }
571571
0 commit comments