From aa6420e9e993166969e36f21f926825bcf49ff83 Mon Sep 17 00:00:00 2001 From: bill <48220860+bnkai@users.noreply.github.com> Date: Tue, 20 Aug 2019 16:46:05 +0300 Subject: [PATCH] bug fix --- pkg/manager/task_scan.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/manager/task_scan.go b/pkg/manager/task_scan.go index dfdc879ab..a0d82b139 100644 --- a/pkg/manager/task_scan.go +++ b/pkg/manager/task_scan.go @@ -46,7 +46,7 @@ func (t *ScanTask) scanGallery() { tx := database.DB.MustBeginTx(ctx, nil) gallery, _ = qb.FindByChecksum(checksum, tx) if gallery != nil { - exists, _ := utils.FileExists(t.FilePath) + exists, _ := utils.FileExists(gallery.Path) if exists { logger.Infof("%s already exists. Duplicate of %s ", t.FilePath, gallery.Path) } else { @@ -101,7 +101,7 @@ func (t *ScanTask) scanScene() { ctx := context.TODO() tx := database.DB.MustBeginTx(ctx, nil) if scene != nil { - exists, _ := utils.FileExists(t.FilePath) + exists, _ := utils.FileExists(scene.Path) if exists { logger.Infof("%s already exists. Duplicate of %s ", t.FilePath, scene.Path) } else {