diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-06-16 14:37:41 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-06-17 14:13:10 +0200 |
commit | 24f0151f812568f63584fbece5a8c50947b51dcd (patch) | |
tree | 3b5740e903656870890956bbe24321dc4a1fb19a /lib/private/connector/sabre/directory.php | |
parent | a89bb1d3839b80f8846b0ed9e462a42065d4ad9f (diff) | |
download | nextcloud-server-24f0151f812568f63584fbece5a8c50947b51dcd.tar.gz nextcloud-server-24f0151f812568f63584fbece5a8c50947b51dcd.zip |
handle locked exceptions when getting file/directory info in sabre
Diffstat (limited to 'lib/private/connector/sabre/directory.php')
-rw-r--r-- | lib/private/connector/sabre/directory.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php index 85756f112e7..e99411068f1 100644 --- a/lib/private/connector/sabre/directory.php +++ b/lib/private/connector/sabre/directory.php @@ -30,6 +30,7 @@ namespace OC\Connector\Sabre; use OC\Connector\Sabre\Exception\InvalidPath; use OC\Connector\Sabre\Exception\FileLocked; use OCP\Lock\LockedException; +use Sabre\DAV\Exception\Locked; class Directory extends \OC\Connector\Sabre\Node implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuota { @@ -191,7 +192,11 @@ class Directory extends \OC\Connector\Sabre\Node if (!is_null($this->dirContent)) { return $this->dirContent; } - $folderContent = $this->fileView->getDirectoryContent($this->path); + try { + $folderContent = $this->fileView->getDirectoryContent($this->path); + } catch (LockedException $e) { + throw new Locked(); + } $nodes = array(); foreach ($folderContent as $info) { |