From 211a76eff3f23c2037b26bc8ea8e4da10f70e823 Mon Sep 17 00:00:00 2001
From: Vincent Petry <pvince81@owncloud.com>
Date: Tue, 28 Feb 2017 10:27:24 +0100
Subject: [PATCH] Add comment

---
 apps/dav/lib/Connector/Sabre/Directory.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php
index 579dbbabf44..435f47ee561 100644
--- a/apps/dav/lib/Connector/Sabre/Directory.php
+++ b/apps/dav/lib/Connector/Sabre/Directory.php
@@ -247,6 +247,8 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
 		}
 		try {
 			if (!$this->info->isReadable()) {
+				// return 403 instead of 404 because a 404 would make
+				// the caller believe that the collection itself does not exist
 				throw new Forbidden('No read permissions');
 			}
 			$folderContent = $this->fileView->getDirectoryContent($this->path);
-- 
GitLab