mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
minor bugfix..
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8c0b00452d
commit
fdbb3f6e24
@ -473,8 +473,7 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
getImagesInPath: ['- File/',
|
getImagesInPath: ['- File/',
|
||||||
function(path, read_stat, skip_preview_search, logger){
|
function(path, read_stat, skip_preview_search, logger){
|
||||||
if(path == null){
|
if(path == null){
|
||||||
return
|
return }
|
||||||
}
|
|
||||||
read_stat = read_stat == null ?
|
read_stat = read_stat == null ?
|
||||||
this.config['image-file-read-stat']
|
this.config['image-file-read-stat']
|
||||||
: read_stat
|
: read_stat
|
||||||
@ -695,15 +694,16 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
path = path || this.location.path
|
path = path || this.location.path
|
||||||
|
|
||||||
if(path == null){
|
if(path == null){
|
||||||
return
|
return }
|
||||||
}
|
|
||||||
|
|
||||||
logger = logger || this.logger
|
logger = logger || this.logger
|
||||||
logger = logger && logger.push('Load new images')
|
logger = logger && logger.push('Load new images')
|
||||||
path = util.normalizePath(path)
|
path = util.normalizePath(path)
|
||||||
|
|
||||||
// cache the loaded images...
|
// cache the loaded images...
|
||||||
var loaded = new Set(this.images.map(function(gid, img){ return img.path }))
|
var loaded = new Set(this.images
|
||||||
|
.map(function(gid, img){
|
||||||
|
return img.path }))
|
||||||
//var base_pattern = RegExp('^'+path)
|
//var base_pattern = RegExp('^'+path)
|
||||||
|
|
||||||
return this.getImagesInPath(
|
return this.getImagesInPath(
|
||||||
@ -736,7 +736,8 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
// XXX is this good enough???
|
// XXX is this good enough???
|
||||||
// ...might be a good idea to compare absolute
|
// ...might be a good idea to compare absolute
|
||||||
// paths...
|
// paths...
|
||||||
if(loaded.has(img.path)){
|
if(loaded.has(img.path)
|
||||||
|
|| loaded.has(pathlib.normalize(img.path))){
|
||||||
delete imgs[gid]
|
delete imgs[gid]
|
||||||
skipped.push(gid)
|
skipped.push(gid)
|
||||||
} else {
|
} else {
|
||||||
@ -775,9 +776,7 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
// XXX report that we are done...
|
// XXX report that we are done...
|
||||||
logger && logger.emit('loaded', imgs)
|
logger && logger.emit('loaded', imgs)
|
||||||
|
|
||||||
return imgs
|
return imgs }) }],
|
||||||
})
|
|
||||||
}],
|
|
||||||
|
|
||||||
|
|
||||||
// Index checking...
|
// Index checking...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user