From: dpavlin Date: Mon, 12 Dec 2005 21:11:17 +0000 (+0000) Subject: r11653@llin: dpavlin | 2005-12-12 23:11:12 +0100 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=00c9d859b06881bea3e8619d04ad64c934613920;p=BackupPC.git r11653@llin: dpavlin | 2005-12-12 23:11:12 +0100 cleanup old single archive increment if it exists git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@261 8392b6e1-25fa-0310-8288-cc32f8e212ea --- diff --git a/bin/BackupPC_tarIncCreate b/bin/BackupPC_tarIncCreate index 52f3618..7704eaa 100755 --- a/bin/BackupPC_tarIncCreate +++ b/bin/BackupPC_tarIncCreate @@ -298,6 +298,12 @@ sub new_tar_part { } else { print STDERR " [last]" if ($opts{v}); move("${tar_path}", "${tar_path_final}"); + + # if this archive was single part, remove it + foreach my $suffix (qw/.tar.gz .md5/) { + my $path = $tar_path_final . $suffix; + unlink $path if (-e $path); + } } $sth_inc_size->execute(