From 6642e2f63d4a9cfcabac733eca38641c4d1065cb Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 29 Jan 2010 11:28:32 +0100 Subject: [PATCH] Tweak ActionOnPurge code --- bacula/src/dird/ua_purge.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bacula/src/dird/ua_purge.c b/bacula/src/dird/ua_purge.c index da53e4d0d8..c4f0d8ecb0 100644 --- a/bacula/src/dird/ua_purge.c +++ b/bacula/src/dird/ua_purge.c @@ -579,7 +579,12 @@ static void do_actions_on_purge(UAContext *ua, MEDIA_DBR *mr) int dvd; uint64_t VolBytes = 0; char dev_name[MAX_NAME_LENGTH]; - + + /* TODO: Return if not mr->Recyle ? */ + if (!mr->Recycle) { + return; + } + if (mr->ActionOnPurge & AOP_TRUNCATE) { /* Send the command to truncate the volume after purge. If this feature * is disabled for the specific device, this will be a no-op. @@ -598,7 +603,7 @@ static void do_actions_on_purge(UAContext *ua, MEDIA_DBR *mr) bash_spaces(mr->MediaType); bash_spaces(pr.Name); - /* We set drive=-1 to let the storage decide of which drive + /* We set drive=-1 to let the storage decides of which drive * to use */ sd->fsend("relabel %s OldName=%s NewName=%s PoolName=%s " -- 2.39.5