mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
Empty directory bug fixed (#179)
added the check to test if the directory is empty by comparing it's length with 0.
This commit is contained in:
committed by
Jeffrey Warren
parent
0fd797ed5a
commit
d3a4c336a0
@@ -2,7 +2,7 @@ var fs = require('fs');
|
||||
var getDirectories = function(rootDir, cb) {
|
||||
fs.readdir(rootDir, function(err, files) {
|
||||
var dirs = [];
|
||||
if(typeof(files)=="undefined") {
|
||||
if(typeof(files)=="undefined" || files.length == 0) {
|
||||
cb(dirs);
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user