investigating a bug...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-10-30 03:42:58 +03:00
parent f93c3a31a2
commit 43f0499843

View File

@ -2083,8 +2083,7 @@ var FileSystemWriterActions = actions.Actions({
// XXX local collections??? // XXX local collections???
// //
// XXX BUG: seems to ignore max_size... // XXX BUG: seems to ignore max_size...
// ...might be that the value does not reach here... // ...'preview-size' does not affect the base image size...
// are we getting all the sttings out correctly???
// XXX BUG: this does not remove previews correctly... // XXX BUG: this does not remove previews correctly...
// to reproduce: // to reproduce:
// open: L:\media\img\my\2019 // open: L:\media\img\my\2019
@ -2115,7 +2114,9 @@ var FileSystemWriterActions = actions.Actions({
if(path && typeof(path) != typeof('str')){ if(path && typeof(path) != typeof('str')){
settings = path settings = path
path = settings.path } path = settings.path }
settings = this.config['export-settings'] || {} settings = settings
|| this.config['export-settings']
|| {}
// XXX resolve env variables in path... // XXX resolve env variables in path...
// ...also add ImageGrid specifics: $IG_INDEX, ... // ...also add ImageGrid specifics: $IG_INDEX, ...
// XXX // XXX
@ -2334,6 +2335,8 @@ var FileSystemWriterActions = actions.Actions({
return Promise.all(queue) }], return Promise.all(queue) }],
// XXX BUG: seems to ignore max_size...
// ...'preview-size' does not affect the base image size...
// XXX might also be good to save/load the export options to .ImageGrid-export.json // XXX might also be good to save/load the export options to .ImageGrid-export.json
// XXX resolve env variables in path... (???) // XXX resolve env variables in path... (???)
// XXX make custom previews (option)... // XXX make custom previews (option)...
@ -2362,7 +2365,9 @@ var FileSystemWriterActions = actions.Actions({
if(path && typeof(path) != typeof('str')){ if(path && typeof(path) != typeof('str')){
settings = path settings = path
path = settings.path } path = settings.path }
settings = this.config['export-settings'] || {} settings = settings
|| this.config['export-settings']
|| {}
// XXX resolve env variables in path... // XXX resolve env variables in path...
// ...also add ImageGrid specifics: $IG_INDEX, ... // ...also add ImageGrid specifics: $IG_INDEX, ...
// XXX // XXX
@ -2474,8 +2479,7 @@ var FileSystemWriterActions = actions.Actions({
logger && logger.emit('queued', to) logger && logger.emit('queued', to)
var res = !fse.existsSync(to) var res = !fse.existsSync(to)
&& copy(from, to) && copy(from, to) }
}
// destination exists... // destination exists...
if(!res){ if(!res){
@ -2486,18 +2490,13 @@ var FileSystemWriterActions = actions.Actions({
.then(function(){ .then(function(){
logger && logger.emit('done', to) }) logger && logger.emit('done', to) })
.catch(function(err){ .catch(function(err){
logger && logger.emit('error', err) }) logger && logger.emit('error', err) }) } }) })
}
})
})
to_dir += level_dir != null ? to_dir += level_dir != null ?
'/'+level_dir '/'+level_dir
: '' : ''
return res return res })) }]
}))
}]
}) })