summaryrefslogtreecommitdiffstats
path: root/lib/private/files.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files.php')
-rw-r--r--lib/private/files.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/files.php b/lib/private/files.php
index 9be5fc9a12f..af10f3e1e32 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -142,6 +142,11 @@ class OC_Files {
$l = \OC::$server->getL10N('core');
$hint = method_exists($ex, 'getHint') ? $ex->getHint() : '';
\OC_Template::printErrorPage($l->t('File is currently busy, please try again later'), $hint);
+ } catch (\OCP\Files\ForbiddenException $ex) {
+ self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
+ OC::$server->getLogger()->logException($ex);
+ $l = \OC::$server->getL10N('core');
+ \OC_Template::printErrorPage($l->t('Can\'t read file'), $ex->getMessage());
} catch (\Exception $ex) {
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
OC::$server->getLogger()->logException($ex);