Stop expiration code if no directories for tasks

pull/1/head
yflory 2018-02-16 17:28:22 +01:00
parent 649fefad54
commit 16447e0313
1 changed files with 4 additions and 0 deletions

View File

@ -72,6 +72,10 @@ nt = nThen(function (w) {
Fs.readdir(root, w(function (e, list) {
if (e) { throw e; }
dirs = list;
if (dirs.length === 0) {
w.abort();
return;
}
}));
}).nThen(function (waitFor) {
FileStorage.create(config, waitFor(function (_store) {