minor fixes and tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-07-10 04:07:45 +03:00
parent 4f08c68179
commit 8efdcbd3eb
3 changed files with 29 additions and 26 deletions

View File

@ -941,7 +941,11 @@ var FileSystemLoaderActions = actions.Actions({
.then(function(){
that.data.clear(res)
return res })
: res }) }],
: res })
// clear out progress...
.then(function(res){
logger && rem_logger.emit('done')
return res }) }],
// XXX EXPERIMENTAL...

View File

@ -193,18 +193,23 @@ var ProgressActions = actions.Actions({
'removed',
]
// close...
// XXX is the right keyword...
if(status == 'done' && rest.length == 0){
this.showProgress(path, 'close')
// report progress...
// XXX HACK -- need meaningful status...
if(add.includes(status)){
this.showProgress(msg, '+0', '+'+l)
} else if(add.includes(status)){
this.showProgress(path, '+0', '+'+l)
} else if(done.includes(status)){
this.showProgress(msg, '+'+l)
this.showProgress(path, '+'+l)
} else if(skipped.includes(status)){
// XXX if everything is skipped the indicator does not
// get hidden...
this.showProgress(msg, '+'+l)
this.showProgress(path, '+'+l)
// XXX STUB...
} else if(status == 'error' ){

View File

@ -367,11 +367,11 @@ function(path, index_dir, logger){
getIndexes(path, index_dir, logger)
.catch(function(err){
logger && logger.emit('error', err)
console.error(err)
})
console.error(err) })
.then(function(paths){
// start loading...
return Promise.all(paths.map(function(p){
return Promise
.all(paths.map(function(p){
p = util.normalizePath(p)
//var path = pathlib.normalize(p +'/'+ index_dir)
var path = util.normalizePath(p +'/'+ index_dir)
@ -382,14 +382,8 @@ function(path, index_dir, logger){
// dir (the parent dir to the index root)
// we do not need to include the index
// itself in the base path...
res[p] = obj
})
}))
})
.then(function(){ resolve(res) })
}
})
}
res[p] = obj }) })) })
.then(function(){ resolve(res) }) } }) }