Skip to content
Snippets Groups Projects
Commit 09a9f540 authored by Brice Maron's avatar Brice Maron
Browse files

Trim url and path of appsroot to have and standart type of path fix oc-1107

parent 3f6a7859
No related branches found
No related tags found
No related merge requests found
......@@ -136,14 +136,16 @@ class OC{
$config_paths = OC_Config::getValue('apps_paths', array());
if(! empty($config_paths)){
foreach($config_paths as $paths) {
if( isset($paths['url']) && isset($paths['path']))
OC::$APPSROOTS[] = $paths;
if( isset($paths['url']) && isset($paths['path'])) {
$paths['url'] = rtrim($paths['url'],'/');
$paths['path'] = rtrim($paths['path'],'/');
OC::$APPSROOTS[] = $paths;
}
}
}elseif(file_exists(OC::$SERVERROOT.'/apps')){
OC::$APPSROOTS[] = array('path'=> OC::$SERVERROOT.'/apps', 'url' => '/apps/', 'writable' => true);
OC::$APPSROOTS[] = array('path'=> OC::$SERVERROOT.'/apps', 'url' => '/apps', 'writable' => true);
}elseif(file_exists(OC::$SERVERROOT.'/../apps')){
OC::$APPSROOTS[] = array('path'=> rtrim(dirname(OC::$SERVERROOT), '/').'/apps', 'url' => '/apps/', 'writable' => true);
OC::$APPSROOT=rtrim(dirname(OC::$SERVERROOT), '/');
OC::$APPSROOTS[] = array('path'=> rtrim(dirname(OC::$SERVERROOT), '/').'/apps', 'url' => '/apps', 'writable' => true);
}
if(empty(OC::$APPSROOTS)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment