]> git.sur5r.net Git - bacula/bacula/commitdiff
bvfs: Do not insert deleted directories in PathVisibility table
authorEric Bollengier <eric@baculasystems.com>
Thu, 6 Jul 2017 08:45:08 +0000 (10:45 +0200)
committerKern Sibbald <kern@sibbald.com>
Wed, 12 Jul 2017 13:36:33 +0000 (15:36 +0200)
bacula/src/cats/bvfs.c

index b395c58ecbd3441c20fe0964bc54eccc5a7864c3..91d82785b3c35806ae9c9475107aba5127266656 100644 (file)
@@ -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) "