From a5d64b031cc377d5c364867a3d1a0e189c52eab9 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 23 Sep 2013 13:20:15 +0400 Subject: [PATCH] minor fix... Signed-off-by: Alex A. Naanou --- ui/data.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/data.js b/ui/data.js index 79a45ed1..d39f61d0 100755 --- a/ui/data.js +++ b/ui/data.js @@ -1826,11 +1826,13 @@ function sortImagesByNameWithSeqOverflow(reverse, proximity){ var need_to_fix = true function cmp(a, b){ - // check filename compliance... - var aa = pattern.test(IMAGES[a].path.split('/').pop()) - var bb = pattern.test(IMAGES[b].path.split('/').pop()) - if(need_to_fix && !aa && !bb){ - need_to_fix = false + if(need_to_fix){ + // check filename compliance... + var aa = pattern.test(IMAGES[a].path.split('/').pop()) + var bb = pattern.test(IMAGES[b].path.split('/').pop()) + if(!aa && !bb){ + need_to_fix = false + } } return imageNameCmp(a, b) }