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) {
37
37
fs . readdir ( options . uploadDir ( ) , _ . bind ( function ( err , list ) {
38
38
async . each ( list , _ . bind ( function ( name , cb ) {
39
39
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
+ } ) ;
52
50
}
53
- cb ( err ) ;
51
+ else cb ( err ) ;
54
52
} , this ) ) ;
55
53
} , this ) ,
56
54
function ( err ) {
You can’t perform that action at this time.
0 commit comments