diff --git a/Viewer/features/cli.js b/Viewer/features/cli.js index 6e28071d..2fad5b64 100755 --- a/Viewer/features/cli.js +++ b/Viewer/features/cli.js @@ -182,7 +182,8 @@ var CLIActions = actions.Actions({ handleLogItem: ['- System/', function(logger, path, status, ...rest){ var msg = path.join(': ') - var l = (rest.length == 1 && rest[0] instanceof Array) ? + var l = (rest.length == 1 + && rest[0] instanceof Array) ? rest[0].length : rest.length @@ -515,16 +516,7 @@ var CLIActions = actions.Actions({ return Promise.all([ // NOTE: no need to call .cacheMetadata(..) as // it is already running after .loadImages(..) - // XXX BUG: for some reason this reports making previews - // but does not actually make them... - // XXX .makePreviews(..) called from cli reports - // creating images but does not... - // ...we seem to be reacing .makeResizedImage(..) - // but them something odd happens -- nether of - // the .then(..) callbacks is called... - // ...even weirder, code before the call executes - // while wrapping the call in a console.log(..) - // produces nothing, not even a syntax error... + // XXX we seem not to be reporting errors here (cli)... index.makePreviews('all') ])} }) .then(function(){ return index diff --git a/Viewer/features/sharp.js b/Viewer/features/sharp.js index 2574b8cb..1cb18b35 100755 --- a/Viewer/features/sharp.js +++ b/Viewer/features/sharp.js @@ -712,8 +712,10 @@ var SharpActions = actions.Actions({ // this is a small list and in this way we can take // advantage of OS file caching, and removing the queue // overhead, though small makes this noticeably faster... + // XXX seems that we have a stray global 'name' variable + // in gui mode... return that.makeResizedImage('sync', [[source, target]], size, null, { - name, + //name: target, skipSmaller: true, transform: false, overwrite: false, @@ -735,7 +737,7 @@ var SharpActions = actions.Actions({ that.markChanged && that.markChanged('images', [gid]) } //*/ - return [gid, size, name] }, + return [gid, size, target] }, function(err){ logger && logger.emit('skipped', `${gid} / ${size}`) }) })) })],