now file count is specifically image count...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-12-10 06:27:35 +03:00
parent 11cef78715
commit c83a4f9ad3

View File

@ -126,10 +126,17 @@ function(path, make){
// NOTE: we do not care how long it will take // NOTE: we do not care how long it will take
// so we'll not wait... // so we'll not wait...
if(res && dir){ if(res && dir){
fs.readdir(path +'/'+ file, function(err, files){ var i = 0
if(!err){ glob(path +'/'+ file +'/*+(jpg|jpeg|png|JPG|JPEG|PNG)')
elem.attr('count', '('+ files.length +')') /*
} .on('match', function(){
i += 1
elem.attr('count', '('+ i +')')
})
*/
.on('end', function(lst){
i += 1
elem.attr('count', '('+ lst.length +')')
}) })
} }
}) })