Skip to content

Commit

Permalink
Fix file sharing via public link for one particular file.
Browse files Browse the repository at this point in the history
Fix OC_Files::get() to not return the first character of the filename
if only one file is requested.
  • Loading branch information
otetard authored and DeepDiver1975 committed Mar 12, 2013
1 parent 2e9d641 commit 17fd648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/files.php
Expand Up @@ -50,7 +50,7 @@ public static function get($dir, $files, $only_header = false) {
$xsendfile = true;
}

if (count($files) == 1) {
if (is_array($files) && count($files) == 1) {
$files = $files[0];
}

Expand Down

0 comments on commit 17fd648

Please sign in to comment.