Fixed warning when browsing Shared folder

The virtual "Shared" folder doesn't have an unencrypted_size field.
This fix adds a check to prevent warnings in the log.

Backport of 022d76c from master
This commit is contained in:
Vincent Petry 2014-03-10 17:25:16 +01:00
parent 23ffdcc314
commit b10b8a470b

View file

@ -343,7 +343,7 @@ class Proxy extends \OC_FileProxy {
\OC_FileProxy::$enabled = false;
$fileInfo = $view->getFileInfo($path);
\OC_FileProxy::$enabled = $proxyState;
if ($fileInfo['unencrypted_size'] > 0) {
if (isset($fileInfo['unencrypted_size']) && $fileInfo['unencrypted_size'] > 0) {
return $fileInfo['unencrypted_size'];
}
return $size;