From: Joe Z. <jz...@us...> - 2005-05-27 22:32:25
|
Update of /cvsroot/bobs/bobs/inc/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7579/inc/templates Modified Files: backup_create_databases.php Log Message: Bug fix: Recursive link causes error in backup_create_databases.php. Index: backup_create_databases.php =================================================================== RCS file: /cvsroot/bobs/bobs/inc/templates/backup_create_databases.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- backup_create_databases.php 9 Aug 2004 02:19:46 -0000 1.7 +++ backup_create_databases.php 27 May 2005 22:32:16 -0000 1.8 @@ -37,13 +37,21 @@ while($entry = $d->read()) { if ($entry != "." && $entry != "..") { - if (is_dir($dirname."/".$entry)) { + // There is a 2GB limit on stat() + // If file is too big to stat, it will show + // on the restore menu as 0 bytes + // with a date of Dec 31, 1969 + + // is_dir will also fail on a recursive link, + // so do is_link first. + + if ((! is_link($dirname."/".$entry)) && is_dir($dirname."/".$entry)) { $dirs[$i++] = $dirname . "/" . $entry; - } else { + } else { $f++; $files[$f]['name'] = $entry; $files[$f]['dir'] = $dirname; - } + } } } |