diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-10-12 17:21:54 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-16 21:41:51 +0200 |
commit | 0cdd46de60a7784d610aae61b9e6d52df611f91f (patch) | |
tree | 950c131b3cd2748e67be7d451bb510eb9f6139f2 /apps/dav/tests | |
parent | ef179331bbcb5acce487882d579753573d5bf84a (diff) | |
download | nextcloud-server-0cdd46de60a7784d610aae61b9e6d52df611f91f.tar.gz nextcloud-server-0cdd46de60a7784d610aae61b9e6d52df611f91f.zip |
fix sabre connector tests when using a non local home storage
Diffstat (limited to 'apps/dav/tests')
-rw-r--r-- | apps/dav/tests/unit/connector/sabre/file.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/dav/tests/unit/connector/sabre/file.php b/apps/dav/tests/unit/connector/sabre/file.php index 9ca8c994a04..9171fc3b786 100644 --- a/apps/dav/tests/unit/connector/sabre/file.php +++ b/apps/dav/tests/unit/connector/sabre/file.php @@ -8,6 +8,7 @@ namespace Test\Connector\Sabre; +use OC\Files\Storage\Local; use Test\HookHelper; use OC\Files\Filesystem; use OCP\Lock\ILockingProvider; @@ -798,14 +799,16 @@ class File extends \Test\TestCase { } $files = []; list($storage, $internalPath) = $userView->resolvePath($path); - $realPath = $storage->getSourcePath($internalPath); - $dh = opendir($realPath); - while (($file = readdir($dh)) !== false) { - if (substr($file, strlen($file) - 5, 5) === '.part') { - $files[] = $file; + if($storage instanceof Local) { + $realPath = $storage->getSourcePath($internalPath); + $dh = opendir($realPath); + while (($file = readdir($dh)) !== false) { + if (substr($file, strlen($file) - 5, 5) === '.part') { + $files[] = $file; + } } + closedir($dh); } - closedir($dh); return $files; } |