]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/tools/dbcheck.c
Removed old sd plugins which doesn't work anymore.
[bacula/bacula] / bacula / src / tools / dbcheck.c
index 2744977cef923e7cd46910fb5371248ffd1a50eb..55986665f865591bb4a636776955b08c1bf8f696 100644 (file)
@@ -882,6 +882,16 @@ static void eliminate_orphaned_file_records()
 
 static void eliminate_orphaned_path_records()
 {
+   db_int64_ctx lctx;
+   lctx.count=0;
+   db_sql_query(db, "SELECT 1 FROM Job WHERE HasCache=1 LIMIT 1", 
+                db_int64_handler, &lctx);
+   
+   if (lctx.count == 1) {
+      printf(_("Pruning orphaned Path entries isn't possible when using BVFS.\n"));
+      return;
+   }
+
    idx_tmp_name = NULL;
    /*
     * Check the existence of the required "one column" index
@@ -1248,6 +1258,7 @@ static void repair_bad_filenames()
          }
          db_sql_query(db, buf, NULL, NULL);
       }
+      free_pool_memory(name);
    }
 }
 
@@ -1309,6 +1320,7 @@ static void repair_bad_paths()
          }
          db_sql_query(db, buf, NULL, NULL);
       }
+      free_pool_memory(name);
    }
 }