]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixup! getWebdir return
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Thu, 28 Dec 2017 09:28:16 +0000 (10:28 +0100)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Wed, 3 Jan 2018 21:05:02 +0000 (22:05 +0100)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
lib/private/Template/SCSSCacher.php

index 8da4d51b749b5b731759a7c68892e4f7d1b86c0b..2f63b425a1e8208b998ca453ca7cf9c012937cdd 100644 (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