diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 2d6437d819f61da042fe2e7056a11407c08849e4..6aab650aa7f302fa3294f92efa376bf1548fec01 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -82,7 +82,12 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { } // Download the file if (isset($_GET['download'])) { - OC_Files::get($path, '', $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + if (isset($_GET['dir'])) { + OC_Files::get($path, '', $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } else { + OC_Files::get("", $path, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } + } else { OCP\Util::addStyle('files_sharing', 'public'); OCP\Util::addScript('files_sharing', 'public');