From b308f6b3b7dfca2b4a04e0353bbc08364b239db1 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 31 May 2016 23:19:24 +0300 Subject: [PATCH] ... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/filesystem.js | 6 +++++- ui (gen4)/file.js | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index 067d032b..8f97763c 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -283,11 +283,15 @@ var FileSystemLoaderActions = actions.Actions({ }) }], + // Get images in path... + // // This will: // - get images from path // - get basic stat data // - get previews from path if they exist // + // Returns: Images object + // getImagesInPath: ['- File/', function(path, read_stat, skip_preview_search, logger){ if(path == null){ @@ -371,7 +375,7 @@ var FileSystemLoaderActions = actions.Actions({ // XXX use the logger... // XXX add a recursive option... // ...might also be nice to add sub-dirs to ribbons... - // XXX add option to preserve/update .data + // XXX add option to preserve/update .data (???) // XXX make image pattern more generic... loadImages: ['- File/Load images', function(path, logger){ diff --git a/ui (gen4)/file.js b/ui (gen4)/file.js index 09896817..39e2b4ff 100755 --- a/ui (gen4)/file.js +++ b/ui (gen4)/file.js @@ -365,7 +365,7 @@ function(path, index_dir, logger){ }) .then(function(paths){ // start loading... - Promise.all(paths.map(function(p){ + return Promise.all(paths.map(function(p){ //var path = pathlib.normalize(p +'/'+ index_dir) var path = util.normalizePath(p +'/'+ index_dir) return loadSaveHistoryList(path, index_dir) @@ -377,8 +377,9 @@ function(path, index_dir, logger){ // itself in the base path... res[p] = obj }) - })).then(function(){ resolve(res) }) + })) }) + .then(function(){ resolve(res) }) } }) }