Skip to content

Commit

Permalink
Revert "bvfs: Do not add an empty path to path table"
Browse files Browse the repository at this point in the history
This reverts commit f0ea06f.

This patch causes problems with bvfs and windows backups.
The drive letters are not visible
  • Loading branch information
pstorz committed Jan 23, 2017
1 parent 7ce6222 commit fa441a3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/cats/bvfs.c
Expand Up @@ -248,7 +248,7 @@ static void build_path_hierarchy(JCR *jcr, B_DB *mdb,
bstrncpy(pathid, org_pathid, sizeof(pathid));

/* Does the ppathid exist for this ? we use a memory cache... In order to
* avoid the full loop, we consider that if a dir is already in the
* avoid the full loop, we consider that if a dir is allready in the
* PathHierarchy table, then there is no need to calculate all the
* hierarchy
*/
Expand All @@ -268,20 +268,14 @@ static void build_path_hierarchy(JCR *jcr, B_DB *mdb,
if (sql_num_rows(mdb) > 0) {
ppathid_cache.insert(pathid);
/* This dir was in the db ...
* It means we can leave, the tree has already been built for
* It means we can leave, the tree has allready been built for
* this dir
*/
goto bail_out;
} else {
/* search or create parent PathId in Path table */
mdb->path = bvfs_parent_dir(path);
mdb->pnl = strlen(mdb->path);

/* Don't add an empty path to the db */
if (!mdb->pnl) {
goto bail_out;
}

if (!db_create_path_record(jcr, mdb, &parent)) {
goto bail_out;
}
Expand All @@ -301,7 +295,7 @@ static void build_path_hierarchy(JCR *jcr, B_DB *mdb,
}
} else {
/* It's already in the cache. We can leave, no time to waste here,
* all the parent dirs have already been done
* all the parent dirs have allready been done
*/
goto bail_out;
}
Expand Down

0 comments on commit fa441a3

Please sign in to comment.