don't try to re-create zero sized increments
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Thu, 26 Jan 2006 10:28:43 +0000 (10:28 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Thu, 26 Jan 2006 10:28:43 +0000 (10:28 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@295 8392b6e1-25fa-0310-8288-cc32f8e212ea

bin/BackupPC_incPartsUpdate

index ead9137..a6093f1 100755 (executable)
@@ -130,7 +130,7 @@ sub get_backup_id($$$) {
                FROM backups 
                INNER JOIN shares       ON backups.shareID=shares.ID
                INNER JOIN hosts        ON backups.hostID = hosts.ID
-               where hosts.name = ? and shares.name = ? and backups.num = ?
+               WHERE hosts.name = ? and shares.name = ? and backups.num = ?
        });
        $sth->execute($host, $share, $num);
        my ($id) = $sth->fetchrow_array;
@@ -387,7 +387,7 @@ from backups
                and shares.id = backups.shareid
        join hosts on shares.hostid = hosts.id
        full outer join backup_parts on backups.id = backup_parts.backup_id
-where not inc_deleted
+where not inc_deleted and backups.size > 0
 group by backups.id, hosts.name, shares.name, backups.num, backups.date, inc_size, parts, backup_parts.backup_id
 order by backups.date