detect empty tars and mark them as such in database
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Wed, 14 Dec 2005 00:00:26 +0000 (00:00 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Wed, 14 Dec 2005 00:00:26 +0000 (00:00 +0000)
(some kind of cleanup whould also be nice)

git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@279 8392b6e1-25fa-0310-8288-cc32f8e212ea

bin/BackupPC_incPartsUpdate

index 0fa029a..a362430 100755 (executable)
@@ -197,6 +197,20 @@ sub tar_check($$$$) {
 
                print ", $items items";
 
+               if ($tar_size == 0) {
+                       print ", EMPTY tar\n";
+
+                       my $backup_id = get_backup_id($host, $share, $num);
+
+                       my $sth_inc_deleted = $dbh->prepare(qq{
+                               update backups set
+                                       inc_deleted = true
+                               where id = ?
+                       });
+                       $sth_inc_deleted->execute($backup_id);
+               }
+
+
                #
                # check if md5 exists, and if not, create one
                #