diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-02-15 21:04:48 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-02-15 21:04:48 +0100 |
commit | 2ed850e05b46d820528813c2f2415dad60c1c570 (patch) | |
tree | a46c29c4fd7c01f71261499c7a33996a23830fc5 /lib/files/view.php | |
parent | 9738fae3cf1ad18593d21eb62e138e00c01f5f36 (diff) | |
parent | 425d41aaf93e1cd3a44ddc794414683e8e2c4648 (diff) | |
download | nextcloud-server-2ed850e05b46d820528813c2f2415dad60c1c570.tar.gz nextcloud-server-2ed850e05b46d820528813c2f2415dad60c1c570.zip |
merge master into filecache_mtime
Diffstat (limited to 'lib/files/view.php')
-rw-r--r-- | lib/files/view.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/files/view.php b/lib/files/view.php index 69e2f1ad349..3348244715e 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -92,7 +92,9 @@ 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 + * ( 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 string @@ -113,7 +115,8 @@ class View { /** * return the path to a local version of the file - * we need this because we can't know if a file is stored local or not from outside the filestorage and for some purposes a local file is needed + * we need this because we can't know if a file is stored local or not from + * outside the filestorage and for some purposes a local file is needed * * @param string $path * @return string @@ -256,7 +259,8 @@ class View { public function file_put_contents($path, $data) { if (is_resource($data)) { //not having to deal with streams in file_put_contents makes life easier $absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path)); - if (\OC_FileProxy::runPreProxies('file_put_contents', $absolutePath, $data) && Filesystem::isValidPath($path)) { + if (\OC_FileProxy::runPreProxies('file_put_contents', $absolutePath, $data) + && Filesystem::isValidPath($path)) { $path = $this->getRelativePath($absolutePath); $exists = $this->file_exists($path); $run = true; @@ -328,7 +332,8 @@ class View { $postFix2 = (substr($path2, -1, 1) === '/') ? '/' : ''; $absolutePath1 = Filesystem::normalizePath($this->getAbsolutePath($path1)); $absolutePath2 = Filesystem::normalizePath($this->getAbsolutePath($path2)); - if (\OC_FileProxy::runPreProxies('rename', $absolutePath1, $absolutePath2) and Filesystem::isValidPath($path2)) { + if (\OC_FileProxy::runPreProxies('rename', $absolutePath1, $absolutePath2) + and Filesystem::isValidPath($path2)) { $path1 = $this->getRelativePath($absolutePath1); $path2 = $this->getRelativePath($absolutePath2); @@ -780,7 +785,8 @@ class View { $rootEntry = $subCache->get(''); if ($rootEntry) { $relativePath = trim(substr($mountPoint, $dirLength), '/'); - if ($pos = strpos($relativePath, '/')) { //mountpoint inside subfolder add size to the correct folder + if ($pos = strpos($relativePath, '/')) { + //mountpoint inside subfolder add size to the correct folder $entryName = substr($relativePath, 0, $pos); foreach ($files as &$entry) { if ($entry['name'] === $entryName) { |