Fixup! getWebdir return

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-12-28 10:28:16 +01:00
parent 89b6bc9424
commit a46d45a652
No known key found for this signature in database
GPG Key ID: FB5ACEED51955BF8
1 changed files with 2 additions and 6 deletions

View File

@ -316,12 +316,8 @@ class SCSSCacher {
* @return string the webDir
*/
private function getWebDir($path, $app) {
// Detect if path is within server root
if(strpos($path, $this->serverRoot) > -1) {
return \OC::$WEBROOT.substr($path, strlen($this->serverRoot));
}
// Detect if path is within an app path
if($appWebPath = \OC_App::getAppWebPath($app)) {
// Detect if path is within server root AND if path is within an app path
if ( strpos($path, $this->serverRoot) === -1 && $appWebPath = \OC_App::getAppWebPath($app) ) {
// Get the file path within the app directory
$appDirectoryPath = explode($app, $path)[1];
// Remove the webroot