Hank Hampel wrote:
>Hi Joe!
>
>I don't know if you already got my bug report from Source Forge, so I
>thought I'd also contact you directly. Unfortunately I saw the
>"Patches" Link to late so I submitted my bug report and patch under
>"Bugs".
>
>However, here we go:
>Incorrect filesize written to DB
>
>When doing a fresh install of bobs 0.6.1 every file you
>backup has a gigantic
>filesize when it is written to the DB (over 1GB for
>every file).
>
>This is caused by an off-by-one error when the results
>of arrStat are entered into the database.
>
>See my patch file below for a correction of this little
>but very serious bug - because you can't do restores on
>small filesystems with this bug in place.
>
>
>Best regards, Hank
>
>
>
>------------------------------------------------------------------------
>
>Index: backup_create_databases.php
>===================================================================
>RCS file: /home/cvs/3rdparty/bobs/inc/templates/backup_create_databases.php,v
>retrieving revision 1.1.1.1
>retrieving revision 1.3
>diff -u -r1.1.1.1 -r1.3
>--- backup_create_databases.php 8 Mar 2004 16:59:21 -0000 1.1.1.1
>+++ backup_create_databases.php 9 Mar 2004 14:13:34 -0000 1.3
>@@ -59,8 +59,8 @@
> dba_insert ($num, $filedate, $this->id);
> }
> // insert filesize
>- // filesize in bytes is at position 8
>- $filesize = $arrStat[8];
>+ // filesize in bytes is at position 8 this is array index 7
>+ $filesize = $arrStat[7];
> $num = $range+3;
> dba_insert ($num, $filesize, $this->id);
> //increment the range
>
>
Thanks for the patch Hank. Sorry I took so long to respond, I've been
down with the flu. I haven't verified this problem yet because I'm
working on another bug right now. The bobs developers monitor the
bobs-devel mailing list, so I'm submitting this patch there.
Thanks again,
Joe Zacky
|