filebackend: remove unneeded is_dir() call in FSFileBackend::doCleanInternal()
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 8 Sep 2019 21:39:52 +0000 (14:39 -0700)
committerKrinkle <krinklemail@gmail.com>
Tue, 10 Sep 2019 03:13:34 +0000 (03:13 +0000)
Change-Id: Ia630e2052edd31f0d9b6ed7068497dc4ae66d917

includes/libs/filebackend/FSFileBackend.php

index 5534cbd..9ed7ae3 100644 (file)
@@ -556,9 +556,7 @@ class FSFileBackend extends FileBackendStore {
                $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid
                $dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
                AtEase::suppressWarnings();
-               if ( is_dir( $dir ) ) {
-                       rmdir( $dir ); // remove directory if empty
-               }
+               rmdir( $dir ); // remove directory if empty
                AtEase::restoreWarnings();
 
                return $status;