pattern = get_pool_memory(PM_NAME);
*jobids = *prev_dir = *pattern = 0;
dir_filenameid = pwd_id = offset = 0;
- see_copies = see_all_version = false;
+ see_copies = see_all_versions = false;
limit = 1000;
attr = new_attr(jcr);
list_entries = result_handler;
POOL_MEM query;
- Mmsg(query,// 1 2 3 4
-"SELECT 'V', File.FileId, File.Md5, File.JobId, File.LStat, "
-// 5 6
+ Mmsg(query,// 1 2 3
+"SELECT 'V', File.PathId, File.FilenameId, File.Md5, "
+// 4 5 6
+ "File.JobId, File.LStat, File.FileId, "
+// 7 8
"Media.VolumeName, Media.InChanger "
"FROM File, Job, Client, JobMedia, Media "
"WHERE File.FilenameId = %s "
/* Only if File Version record */
BVFS_Md5 = 3,
- BVFS_VolName = 4,
- BVFS_VolInchanger = 5
+ BVFS_VolName = 7,
+ BVFS_VolInchanger = 8
} bvfs_row_index;
class Bvfs {
void update_cache();
- void set_see_all_version(bool val) {
- see_all_version = val;
+ void set_see_all_versions(bool val) {
+ see_all_versions = val;
}
void set_see_copies(bool val) {
POOLMEM *prev_dir; /* ls_dirs query returns all versions, take the 1st one */
ATTR *attr; /* Can be use by handler to call decode_stat() */
- bool see_all_version;
+ bool see_all_versions;
bool see_copies;
DBId_t get_dir_filenameid();
#define bvfs_is_dir(row) ((row)[BVFS_Type][0] == BVFS_DIR_RECORD)
#define bvfs_is_file(row) ((row)[BVFS_Type][0] == BVFS_FILE_RECORD)
+#define bvfs_is_version(row) ((row)[BVFS_Type][0] == BVFS_FILE_VERSION)
+
void bvfs_update_path_hierarchy_cache(JCR *jcr, B_DB *mdb, char *jobids);
void bvfs_update_cache(JCR *jcr, B_DB *mdb);