Hide filebackend listing exceptions for thumbnail purges
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 27 Sep 2013 18:36:59 +0000 (11:36 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 27 Sep 2013 18:37:02 +0000 (11:37 -0700)
bug: 54674
Change-Id: I20db9004fc8b5509f7731b1e678efc6f0aed6cdb

includes/filerepo/file/LocalFile.php

index 4edcebf..d6dc150 100644 (file)
@@ -788,10 +788,12 @@ class LocalFile extends File {
 
                $backend = $this->repo->getBackend();
                $files = array( $dir );
-               $iterator = $backend->getFileList( array( 'dir' => $dir ) );
-               foreach ( $iterator as $file ) {
-                       $files[] = $file;
-               }
+               try {
+                       $iterator = $backend->getFileList( array( 'dir' => $dir ) );
+                       foreach ( $iterator as $file ) {
+                               $files[] = $file;
+                       }
+               } catch ( FileBackendError $e ) {} // suppress (bug 54674)
 
                return $files;
        }