aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filebackend/FileBackendStore.php
diff options
context:
space:
mode:
authorumherirrender <umherirrender_de.wp@web.de>2012-11-16 21:47:01 +0100
committerAaron Schulz <aschulz@wikimedia.org>2012-11-16 12:55:22 -0800
commit9e504dd8e66d6b7c8ad102602d0f718f209943de (patch)
tree50c2d01af8094d250f548eccc3f46a49f795ec85 /includes/filebackend/FileBackendStore.php
parentc2bc0fcc27dba9605b855b9ddbb24c0212567110 (diff)
downloadmediawikicore-9e504dd8e66d6b7c8ad102602d0f718f209943de.tar.gz
mediawikicore-9e504dd8e66d6b7c8ad102602d0f718f209943de.zip
Unset DirectoryIterator in the FileBackend
This is necessory to close all handlers on the directory and than it is possible to rmdir the directory without a 'permission denied' on a windows machine. Corresponding unit test failure: 1) FileBackendTest::testRecursiveClean Dir mwstore://localtesting/unittest-cont1/e/a no longer exists (FSFileBackend). Failed asserting that true matches expected false. Change-Id: Ide58c6d0ec101bf0ddcd6b7414c51075fc28825b
Diffstat (limited to 'includes/filebackend/FileBackendStore.php')
-rw-r--r--includes/filebackend/FileBackendStore.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php
index 43e6cb3ed84a..0f435a399df4 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -507,6 +507,7 @@ abstract class FileBackendStore extends FileBackend {
$subDir = $params['dir'] . "/{$subDirRel}"; // full path
$status->merge( $this->doClean( array( 'dir' => $subDir ) + $params ) );
}
+ unset( $subDirsRel ); // free directory for rmdir() on Windows (for FS backends)
}
}