Stop expiration code if no directories for tasks
This commit is contained in:
parent
649fefad54
commit
16447e0313
@ -72,6 +72,10 @@ nt = nThen(function (w) {
|
|||||||
Fs.readdir(root, w(function (e, list) {
|
Fs.readdir(root, w(function (e, list) {
|
||||||
if (e) { throw e; }
|
if (e) { throw e; }
|
||||||
dirs = list;
|
dirs = list;
|
||||||
|
if (dirs.length === 0) {
|
||||||
|
w.abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
}).nThen(function (waitFor) {
|
}).nThen(function (waitFor) {
|
||||||
FileStorage.create(config, waitFor(function (_store) {
|
FileStorage.create(config, waitFor(function (_store) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user