Skip to content

Commit

Permalink
Fix for purge command not purging and truncating.
Browse files Browse the repository at this point in the history
Fix for purge command not purging and truncating volumes when run
with action parameter

Fixes #282: Running purge command with action parameter does not purge
            or truncates volumes

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
jkhradil authored and Marco van Wieringen committed Feb 25, 2014
1 parent 8eec411 commit dc89f66
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/dird/ua_purge.c
Expand Up @@ -141,18 +141,18 @@ int purge_cmd(UAContext *ua, const char *cmd)
}
/* Volume */
case 2:
/* Perform ActionOnPurge (action=truncate) */
if (find_arg(ua, "action") >= 0) {
return action_on_purge_cmd(ua, ua->cmd);
}

while ((i=find_arg(ua, NT_("volume"))) >= 0) {
if (select_media_dbr(ua, &mr)) {
purge_jobs_from_volume(ua, &mr, /*force*/true);
}
*ua->argk[i] = 0; /* zap keyword already seen */
ua->send_msg("\n");
}

/* Perform ActionOnPurge (action=truncate) */
if (find_arg(ua, "action") >= 0) {
return action_on_purge_cmd(ua, ua->cmd);
}
return 1;
/* Quota */
case 3:
Expand Down

0 comments on commit dc89f66

Please sign in to comment.