From: Eric Bollengier Date: Thu, 6 Jul 2017 08:45:08 +0000 (+0200) Subject: bvfs: Do not insert deleted directories in PathVisibility table X-Git-Tag: Release-9.0.1~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b1eb2483a318c2aeaf9f32e796d7e7a398bb2406;p=bacula%2Fbacula bvfs: Do not insert deleted directories in PathVisibility table --- 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) "