]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/bvfs.c
bvfs: Do not insert deleted directories in PathVisibility table
[bacula/bacula] / 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) "