summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-03-03 12:56:08 +0100
committerRobin Appelman <icewind@owncloud.com>2014-03-03 12:56:08 +0100
commitc87658fedab5073642848b2db0e8707dc2b5cff4 (patch)
tree3b34e2edc7a24fc5661d91e0c8028eab1521b9d2 /lib
parent3ff12ef4eca82325a6e4f1244a12597174e07192 (diff)
downloadnextcloud-server-c87658fedab5073642848b2db0e8707dc2b5cff4.tar.gz
nextcloud-server-c87658fedab5073642848b2db0e8707dc2b5cff4.zip
Fix updater when getFileInfo fails
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/cache/updater.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php
index 7a45b9e9e96..f6ea914bf62 100644
--- a/lib/private/files/cache/updater.php
+++ b/lib/private/files/cache/updater.php
@@ -119,6 +119,9 @@ class Updater {
if ($uid != \OCP\User::getUser()) {
$info = \OC\Files\Filesystem::getFileInfo($filename);
+ if (!$info) {
+ return array($uid, '/files/' . $filename);
+ }
$ownerView = new \OC\Files\View('/' . $uid . '/files');
$filename = $ownerView->getPath($info['fileid']);
}
@@ -150,7 +153,7 @@ class Updater {
$cache->update($id, array('mtime' => $time, 'etag' => $storage->getETag($internalPath)));
if ($realPath !== '') {
$realPath = dirname($realPath);
- if($realPath === DIRECTORY_SEPARATOR ) {
+ if ($realPath === DIRECTORY_SEPARATOR) {
$realPath = "";
}
// check storage for parent in case we change the storage in this step