From 491250320a6b19f9a7d546598e97eac1e90f78f7 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 21 Sep 2015 14:09:28 +0200 Subject: Replaces if ($file === '.' || $file === '..') by if(\OC\Files\Filesystem::isIgnoredDir($file)). Eases to find where this operation is used. --- lib/private/files/storage/common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/files/storage/common.php') diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index a5ed5fd3996..2d579fa2b60 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -260,7 +260,7 @@ abstract class Common implements Storage { $dh = $this->opendir($path); if (is_resource($dh)) { while (($file = readdir($dh)) !== false) { - if ($file !== '.' and $file !== '..') { + if (!\OC\Files\Filesystem::isIgnoredDir($file)) { if ($this->is_dir($path . '/' . $file)) { mkdir($target . '/' . $file); $this->addLocalFolder($path . '/' . $file, $target . '/' . $file); @@ -283,7 +283,7 @@ abstract class Common implements Storage { $dh = $this->opendir($dir); if (is_resource($dh)) { while (($item = readdir($dh)) !== false) { - if ($item == '.' || $item == '..') continue; + if (\OC\Files\Filesystem::isIgnoredDir($item)) continue; if (strstr(strtolower($item), strtolower($query)) !== false) { $files[] = $dir . '/' . $item; } -- cgit v1.2.3