From b1eb2483a318c2aeaf9f32e796d7e7a398bb2406 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 6 Jul 2017 10:45:08 +0200 Subject: [PATCH] bvfs: Do not insert deleted directories in PathVisibility table --- bacula/src/cats/bvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bacula/src/cats/bvfs.c b/bacula/src/cats/bvfs.c index b395c58ecb..91d82785b3 100644 --- a/bacula/src/cats/bvfs.c +++ b/bacula/src/cats/bvfs.c @@ -439,7 +439,7 @@ static int update_path_hierarchy_cache(JCR *jcr, /* Inserting path records for JobId */ Mmsg(mdb->cmd, "INSERT INTO PathVisibility (PathId, JobId) " "SELECT DISTINCT PathId, JobId " - "FROM (SELECT PathId, JobId FROM File WHERE JobId = %s " + "FROM (SELECT PathId, JobId FROM File WHERE JobId = %s AND FileIndex <> 0 " "UNION " "SELECT PathId, BaseFiles.JobId " "FROM BaseFiles JOIN File AS F USING (FileId) " -- 2.39.5