mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
minor tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8e11308ed6
commit
6d678abd87
@ -854,6 +854,7 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
return res.flat() })
|
return res.flat() })
|
||||||
}],
|
}],
|
||||||
// XXX EXPERIMENTAL...
|
// XXX EXPERIMENTAL...
|
||||||
|
// XXX add a context wrapper a-la .makeIndex(..)...
|
||||||
_checkIndex: ['File/Check index consistency',
|
_checkIndex: ['File/Check index consistency',
|
||||||
// XXX technically this can be a non-session queue, but we'll
|
// XXX technically this can be a non-session queue, but we'll
|
||||||
// need to save the check results...
|
// need to save the check results...
|
||||||
@ -863,7 +864,9 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
// no index loaded...
|
// no index loaded...
|
||||||
if(!this.location.loaded){
|
if(!this.location.loaded){
|
||||||
// XXX should this throw or resolve???
|
// XXX should this throw or resolve???
|
||||||
throw new Error('.checkIndex(): no index to fix.') }
|
//throw new Error('.checkIndex(): no index to fix.') }
|
||||||
|
// XXX test...
|
||||||
|
return [] }
|
||||||
// merged index...
|
// merged index...
|
||||||
// XXX can we remove this restriction -- i.e. check each index...
|
// XXX can we remove this restriction -- i.e. check each index...
|
||||||
if(this.location.loaded.length > 1){
|
if(this.location.loaded.length > 1){
|
||||||
@ -880,11 +883,13 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
!fse.existsSync(image.base_path +'/'+ p[1])
|
!fse.existsSync(image.base_path +'/'+ p[1])
|
||||||
&& (updated = true)
|
&& (updated = true)
|
||||||
&& (delete previews[p[0]]) })
|
&& (delete previews[p[0]]) })
|
||||||
|
// XXX do we need this???
|
||||||
|
Object.keys(previews).length == 0
|
||||||
|
&& (delete image.preview)
|
||||||
// image .path...
|
// image .path...
|
||||||
!fse.existsSync(image.base_path +'/'+ image.path)
|
!fse.existsSync(image.base_path +'/'+ image.path)
|
||||||
&& (updated = true)
|
&& (updated = true)
|
||||||
&& (delete image.path)
|
&& (delete image.path)
|
||||||
|
|
||||||
// XXX check return values...
|
// XXX check return values...
|
||||||
return updated ?
|
return updated ?
|
||||||
gid
|
gid
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user