From 17fd6482d873c170278aafeceb9005415f272901 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20T=C3=A9tard?= <olivier.tetard@miskin.fr>
Date: Tue, 12 Mar 2013 11:53:41 +0100
Subject: [PATCH] Fix file sharing via public link for one particular file.

Fix OC_Files::get() to not return the first character of the filename
if only one file is requested.
---
 lib/files.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/files.php b/lib/files.php
index 2433502444..04ba51d9d2 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -50,7 +50,7 @@ class OC_Files {
 			$xsendfile = true;
 		}
 
-		if (count($files) == 1) {
+		if (is_array($files) && count($files) == 1) {
 			$files = $files[0];
 		}
 
-- 
GitLab