summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-18 12:35:44 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-19 10:06:15 +0100
commitbc76998cd2b74b8d4d1b2d69123d6e9dc23ad24e (patch)
treec23304c7cbe00a668df0ee40197a8a082fecf3ab
parentf371f14fc2117206fd063d4b8fe9bee071418ba4 (diff)
downloadnextcloud-server-bc76998cd2b74b8d4d1b2d69123d6e9dc23ad24e.tar.gz
nextcloud-server-bc76998cd2b74b8d4d1b2d69123d6e9dc23ad24e.zip
Simple fix for the wrong Mapper reset
-rw-r--r--lib/private/files/storage/mappedlocal.php3
-rw-r--r--tests/testcleanuplistener.php6
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) {