Merge pull request #31143 from nextcloud/fix/dont-redirect-file-index

Don't redirect when loading files index page
This commit is contained in:
Vincent Petry 2022-02-18 12:31:24 +01:00 committed by GitHub
commit 280cc47a86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,7 +184,7 @@ class ViewController extends Controller {
* @throws NotFoundException
*/
public function index($dir = '', $view = '', $fileid = null, $fileNotFound = false, $openfile = null) {
if ($fileid !== null) {
if ($fileid !== null && $dir === '') {
try {
return $this->redirectToFile($fileid);
} catch (NotFoundException $e) {