diff --git a/apps/files_sharing/publicwebdav.php b/apps/files_sharing/publicwebdav.php
index df2c04cf45c60df6e77240ad573cd84c0a98da43..b4f56eed89cb6993c40692ac5bf363b7ecf8e756 100644
--- a/apps/files_sharing/publicwebdav.php
+++ b/apps/files_sharing/publicwebdav.php
@@ -47,8 +47,12 @@ $server->subscribeEvent('beforeMethod', function () use ($server, $objectTree, $
 	$rootInfo = $view->getFileInfo('');
 
 	// Create ownCloud Dir
-	$rootDir = new OC_Connector_Sabre_Directory($view, $rootInfo);
-	$objectTree->init($rootDir, $view);
+	if ($rootInfo->getType() === 'dir') {
+		$root = new OC_Connector_Sabre_Directory($view, $rootInfo);
+	} else {
+		$root = new OC_Connector_Sabre_File($view, $rootInfo);
+	}
+	$objectTree->init($root, $view);
 
 	$server->addPlugin(new OC_Connector_Sabre_AbortedUploadDetectionPlugin($view));
 	$server->addPlugin(new OC_Connector_Sabre_QuotaPlugin($view));
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 4e90d46ad41f2af4655505ffffa8a8a2f572fa38..7591cc5c0669416bdb748b430cac24ec35235c95 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -140,7 +140,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
 		if (\OC_Util::encryptedFiles()) {
 			throw new \Sabre\DAV\Exception\ServiceUnavailable();
 		} else {
-			return $this->fileView->fopen($this->path, 'rb');
+			return $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
 		}
 
 	}