File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -37,20 +37,18 @@ module.exports = function (options) {
3737 fs . readdir ( options . uploadDir ( ) , _ . bind ( function ( err , list ) {
3838 async . each ( list , _ . bind ( function ( name , cb ) {
3939 fs . stat ( options . uploadDir ( ) + '/' + name , _ . bind ( function ( err , stats ) {
40- if ( ! err ) {
41- if ( stats . isFile ( ) ) {
42- fileInfo = new FileInfo ( {
43- name : name ,
44- size : stats . size
45- } ) ;
46- this . initUrls ( fileInfo , function ( err ) {
47- files . push ( fileInfo ) ;
48- cb ( err ) ;
49- return ;
50- } ) ;
51- }
40+ if ( ! err && stats . isFile ( ) ) {
41+ fileInfo = new FileInfo ( {
42+ name : name ,
43+ size : stats . size
44+ } ) ;
45+ this . initUrls ( fileInfo , function ( err ) {
46+ files . push ( fileInfo ) ;
47+ cb ( err ) ;
48+ return ;
49+ } ) ;
5250 }
53- cb ( err ) ;
51+ else cb ( err ) ;
5452 } , this ) ) ;
5553 } , this ) ,
5654 function ( err ) {
You can’t perform that action at this time.
0 commit comments