Skip to content

Commit 267a5bd

Browse files
ilya071294AlexPeshkoff
authored andcommitted
Fixed deletion of existing backup file when backup is unsuccessful (#43)
1 parent 0f94098 commit 267a5bd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/burp/burp.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,11 +1370,12 @@ int gbak(Firebird::UtilSvc* uSvc)
13701370
if (file->fil_fd != INVALID_HANDLE_VALUE)
13711371
{
13721372
close_platf(file->fil_fd);
1373-
}
1374-
if (exit_code != FINI_OK &&
1375-
(tdgbl->action->act_action == ACT_backup_split || tdgbl->action->act_action == ACT_backup))
1376-
{
1377-
unlink_platf(tdgbl->toSystem(file->fil_name).c_str());
1373+
1374+
if (exit_code != FINI_OK &&
1375+
(tdgbl->action->act_action == ACT_backup_split || tdgbl->action->act_action == ACT_backup))
1376+
{
1377+
unlink_platf(tdgbl->toSystem(file->fil_name).c_str());
1378+
}
13781379
}
13791380
}
13801381
}

0 commit comments

Comments
 (0)