From cbb5639be34be4f7d134fd95bb205a94f93b103c Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 12 Aug 2009 16:48:01 +0200 Subject: [PATCH] fix offset in new lsdirs/lsfiles command --- bacula/src/dird/ua_dotcmds.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bacula/src/dird/ua_dotcmds.c b/bacula/src/dird/ua_dotcmds.c index 92790af810..363d12fd8f 100644 --- a/bacula/src/dird/ua_dotcmds.c +++ b/bacula/src/dird/ua_dotcmds.c @@ -262,9 +262,8 @@ static bool dot_lsfiles(UAContext *ua, const char *cmd) Bvfs fs(ua->jcr, ua->db); fs.set_jobids(jobid); - fs.set_limit(limit); - fs.set_offset(offset); fs.set_handler(bvfs_result_handler, ua); + fs.set_limit(limit); if (pathid) { fs.ch_dir(pathid); @@ -272,6 +271,8 @@ static bool dot_lsfiles(UAContext *ua, const char *cmd) fs.ch_dir(path); } + fs.set_offset(offset); + fs.ls_files(); return true; @@ -298,7 +299,6 @@ static bool dot_lsdirs(UAContext *ua, const char *cmd) Bvfs fs(ua->jcr, ua->db); fs.set_jobids(jobid); fs.set_limit(limit); - fs.set_offset(offset); fs.set_handler(bvfs_result_handler, ua); if (pathid) { @@ -307,6 +307,8 @@ static bool dot_lsdirs(UAContext *ua, const char *cmd) fs.ch_dir(path); } + fs.set_offset(offset); + fs.ls_special_dirs(); fs.ls_dirs(); -- 2.39.5