From c49d1e8953c6f88cc3ca5bc981d998e4b69d68ac Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 17 Feb 2009 02:48:40 +0000 Subject: [PATCH] * Fix batching * Report when there is a directory where a file should be --- maintenance/checkImages.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/maintenance/checkImages.php b/maintenance/checkImages.php index 994cd5b9f2..378caa348b 100644 --- a/maintenance/checkImages.php +++ b/maintenance/checkImages.php @@ -11,7 +11,8 @@ $numImages = 0; $numGood = 0; do { - $res = $dbr->select( 'image', '*', array( 'img_name > ' . $dbr->addQuotes( $start ) ) ); + $res = $dbr->select( 'image', '*', array( 'img_name > ' . $dbr->addQuotes( $start ) ), + 'checkImages.php', array( 'LIMIT' => $batchSize ) ); foreach ( $res as $row ) { $numImages++; $start = $row->img_name; @@ -27,6 +28,11 @@ do { continue; } + if ( $stat['mode'] & 040000 ) { + echo "{$row->img_name}: is a directory\n"; + continue; + } + if ( $stat['size'] == 0 && $row->img_size != 0 ) { echo "{$row->img_name}: truncated, was {$row->img_size}\n"; continue; -- 2.20.1