Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-01-15 19:27:09 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-01-15 19:27:09 +0300
commit6d87922cea82ce56611080528e9d02ebcdd112b8 (patch)
treed78658e1283930001d3d6a3184aa80d9c0222bc4
parentd534f262aaa21773df5a55099e0d95d2d96434e2 (diff)
parent0753514e5b98f570607c59a226a237a52272aa43 (diff)
Merge pull request #13384 from owncloud/stable7-fix-13317-backport
Fix backport of #13317
-rw-r--r--lib/private/files/view.php19
-rw-r--r--tests/lib/files/view.php1
2 files changed, 17 insertions, 3 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 430e9e6900b..7609dbe536c 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -113,6 +113,19 @@ class View {
}
/**
+ * get the mountpoint of the storage object for a path
+ * ( note: because a storage is not always mounted inside the fakeroot, the
+ * returned mountpoint is relative to the absolute root of the filesystem
+ * and doesn't take the chroot into account )
+ *
+ * @param string $path
+ * @return \OC\Files\Mount\Mount
+ */
+ public function getMount($path) {
+ return Filesystem::getMountManager()->find($this->getAbsolutePath($path));
+ }
+
+ /**
* resolve a path to a storage and internal path
*
* @param string $path
@@ -1277,7 +1290,7 @@ class View {
$this->getAbsolutePath($path),
$storage,
$internalPath,
- [
+ array(
'fileid' => null,
'mimetype' => $storage->getMimeType($internalPath),
'name' => basename($path),
@@ -1285,8 +1298,8 @@ class View {
'size' => $storage->filesize($internalPath),
'mtime' => $storage->filemtime($internalPath),
'encrypted' => false,
- 'permissions' => \OCP\Constants::PERMISSION_ALL
- ],
+ 'permissions' => \OCP\PERMISSION_ALL
+ ),
$mount
);
}
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php
index a30d6df4339..ce78896b152 100644
--- a/tests/lib/files/view.php
+++ b/tests/lib/files/view.php
@@ -8,6 +8,7 @@
namespace Test\Files;
use OC\Files\Cache\Watcher;
+use OC\Files\Storage\Temporary;
class TemporaryNoTouch extends \OC\Files\Storage\Temporary {
public function touch($path, $mtime = null) {