summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-09-23 11:34:23 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-23 11:34:23 +0200
commitbcdb3c26da28e3797833da3afaac997d067730be (patch)
treee57c43b6b2c5bf1340599be36f257f9f8be99cfb /tests
parent4c62d71db7f1b8ff490011bcc5050e835b70e745 (diff)
parent491250320a6b19f9a7d546598e97eac1e90f78f7 (diff)
downloadnextcloud-server-bcdb3c26da28e3797833da3afaac997d067730be.tar.gz
nextcloud-server-bcdb3c26da28e3797833da3afaac997d067730be.zip
Merge pull request #19236 from owncloud/call_dot_directories_function
Replaces if ($file === '.' || $file === '..') by public function call isIgnoredDir
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/storage/wrapper/jail.php2
-rw-r--r--tests/lib/testcase.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/files/storage/wrapper/jail.php b/tests/lib/files/storage/wrapper/jail.php
index a7bd684df44..9b16bc5a321 100644
--- a/tests/lib/files/storage/wrapper/jail.php
+++ b/tests/lib/files/storage/wrapper/jail.php
@@ -30,7 +30,7 @@ class Jail extends \Test\Files\Storage\Storage {
$contents = array();
$dh = $this->sourceStorage->opendir('');
while ($file = readdir($dh)) {
- if ($file !== '.' and $file !== '..') {
+ if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
$contents[] = $file;
}
}
diff --git a/tests/lib/testcase.php b/tests/lib/testcase.php
index 854d5f4f65b..7e4890a46c2 100644
--- a/tests/lib/testcase.php
+++ b/tests/lib/testcase.php
@@ -193,7 +193,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
static protected function tearDownAfterClassCleanStrayDataUnlinkDir($dir) {
if ($dh = @opendir($dir)) {
while (($file = readdir($dh)) !== false) {
- if ($file === '..' || $file === '.') {
+ if (\OC\Files\Filesystem::isIgnoredDir($file)) {
continue;
}
$path = $dir . '/' . $file;