From e2cfcd992cf6f4bb5f1cdb9070d3d0ea2a1504e2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 13 Nov 2015 14:13:16 +0100 Subject: Allow storage wrappers to through a forbidden exception with retry information --- lib/private/files.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/private/files.php') 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); -- cgit v1.2.3