From e296380ddf800d8cca07dd38ff75d3f78da7d236 Mon Sep 17 00:00:00 2001 From: dimitr Date: Mon, 2 May 2005 17:22:16 +0000 Subject: [PATCH] Fixed GBAK -kill dropping existing shadow. --- src/jrd/vio.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp index bdf6713098..81b48f1826 100644 --- a/src/jrd/vio.cpp +++ b/src/jrd/vio.cpp @@ -1373,21 +1373,23 @@ void VIO_erase(thread_db* tdbb, record_param* rpb, jrd_tra* transaction) { const bool name_defined = EVL_field(0, rpb->rpb_record, f_file_name, &desc); - USHORT rel_flags; - if (EVL_field(0, rpb->rpb_record, f_file_flags, &desc2) && - ((rel_flags = MOV_get_long(&desc2, 0)) & FILE_difference)) + USHORT file_flags = + EVL_field(0, rpb->rpb_record, f_file_flags, &desc2) ? + MOV_get_long(&desc2, 0) : 0; + if (file_flags & FILE_difference) { - if (rel_flags & FILE_backing_up) + if (file_flags & FILE_backing_up) DFW_post_work(transaction, dfw_end_backup, &desc, 0); if (name_defined) DFW_post_work(transaction, dfw_delete_difference, &desc, 0); } - else - if (EVL_field(0, rpb->rpb_record, f_file_shad_num, &desc2) && - (id = MOV_get_long(&desc2, 0))) - { + else if (EVL_field(0, rpb->rpb_record, f_file_shad_num, &desc2) && + (id = MOV_get_long(&desc2, 0))) + { + if (!(file_flags & FILE_inactive)) { DFW_post_work(transaction, dfw_delete_shadow, &desc, id); } + } break; }