diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-11-18 12:35:44 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-11-19 10:06:15 +0100 |
commit | bc76998cd2b74b8d4d1b2d69123d6e9dc23ad24e (patch) | |
tree | c23304c7cbe00a668df0ee40197a8a082fecf3ab | |
parent | f371f14fc2117206fd063d4b8fe9bee071418ba4 (diff) | |
download | nextcloud-server-bc76998cd2b74b8d4d1b2d69123d6e9dc23ad24e.tar.gz nextcloud-server-bc76998cd2b74b8d4d1b2d69123d6e9dc23ad24e.zip |
Simple fix for the wrong Mapper reset
-rw-r--r-- | lib/private/files/storage/mappedlocal.php | 3 | ||||
-rw-r--r-- | 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) { |