From 2d083797dbf7517575c436653e27855012d44eb4 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 6 Nov 2013 12:47:49 -0800 Subject: [PATCH] Catch temp container thumbnails in cleanup script Change-Id: Iba2badac3abf08e5c4a409ccf10d831e0e9b341e --- maintenance/cleanupUploadStash.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index ba7c3cf60e..bc43c6760b 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -120,7 +120,9 @@ class UploadStashCleanup extends Maintenance { $i = 0; foreach ( $iterator as $file ) { // Absolute sanity check for stashed files and file segments - if ( !preg_match( '#(^\d{14}!|\.\d+\.\w+\.\d+$)#', basename( $file ) ) ) { + $base = basename( $file ); + // @TODO: why are there thumbnails stored in here? + if ( !preg_match( '#(^\d{14}!|\.\d+\.\w+\.\d+$|-\w{12}\.\w{6}\.\d+\.)#', $base ) ) { $this->output( "Skipped non-stash $file\n" ); continue; } -- 2.20.1