From: Joas Schilling Date: Tue, 18 Nov 2014 11:35:44 +0000 (+0100) Subject: Simple fix for the wrong Mapper reset X-Git-Tag: v7.0.4RC1~22^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bc76998cd2b74b8d4d1b2d69123d6e9dc23ad24e;p=nextcloud-server.git Simple fix for the wrong Mapper reset --- diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php index ea4deaa66e8..4ff02d29523 100644 --- a/lib/private/files/storage/mappedlocal.php +++ b/lib/private/files/storage/mappedlocal.php @@ -24,9 +24,6 @@ class MappedLocal extends \OC\Files\Storage\Common { } public function __destruct() { - if (defined('PHPUNIT_RUN')) { - $this->mapper->removePath($this->datadir, true, true); - } } public function getId() { diff --git a/tests/testcleanuplistener.php b/tests/testcleanuplistener.php index fe4fef61ab5..1ef5a4cfd5d 100644 --- a/tests/testcleanuplistener.php +++ b/tests/testcleanuplistener.php @@ -100,6 +100,12 @@ class TestCleanupListener implements PHPUnit_Framework_TestListener { '.' => true ); $datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data'); + + if (\OC_Util::runningOnWindows()) { + $mapper = new \OC\Files\Mapper($datadir); + $mapper->removePath($datadir, true, true); + } + $entries = array(); if ($dh = opendir($datadir)) { while (($file = readdir($dh)) !== false) {