From bc76998cd2b74b8d4d1b2d69123d6e9dc23ad24e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 18 Nov 2014 12:35:44 +0100 Subject: [PATCH] Simple fix for the wrong Mapper reset --- lib/private/files/storage/mappedlocal.php | 3 --- tests/testcleanuplistener.php | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) 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) { -- 2.39.5