1
0
Fork 0
mirror of https://github.com/Yetangitu/owncloud-apps.git synced 2025-10-02 14:49:17 +02:00

files_reader: #35, Internal Server Error: fixed path resolution so app works when NC/OC hosted in subdirectory

This commit is contained in:
frankdelange 2017-03-19 18:21:23 +01:00
parent 9865f94e70
commit b3c98adcfd
4 changed files with 5 additions and 4 deletions

View file

@ -129,7 +129,7 @@ class PageController extends Controller {
} else {
$filePath = $path;
$fileId = $this->rootFolder->getUserFolder($this->userId)
->get(explode("/", rawurldecode($this->request->get['file']),4)[3])
->get(preg_replace("/.*\/remote.php\/webdav(.*)/", "$1", rawurldecode($this->request->get['file'])))
->getFileInfo()
->getId();
}