[Pkg-owncloud-commits] [owncloud] 34/74: Simple fix for the wrong Mapper reset
David Prévot
taffit at moszumanska.debian.org
Tue Dec 2 22:04:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit bc76998cd2b74b8d4d1b2d69123d6e9dc23ad24e
Author: Joas Schilling <nickvergessen at gmx.de>
Date: Tue Nov 18 12:35:44 2014 +0100
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 ea4deaa..4ff02d2 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 fe4fef6..1ef5a4c 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) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list