diff options
author | Brice Maron <brice@bmaron.net> | 2012-06-25 15:50:27 +0200 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-06-25 15:50:27 +0200 |
commit | 09a9f5400e011ed691a7f4faca03f39ac3b5e7ba (patch) | |
tree | e8319d01756007c2043b2eed3293aefdb4fcd528 /lib | |
parent | 3f6a7859c9ed71823767ff0932c9ff48067be1e2 (diff) | |
download | nextcloud-server-09a9f5400e011ed691a7f4faca03f39ac3b5e7ba.tar.gz nextcloud-server-09a9f5400e011ed691a7f4faca03f39ac3b5e7ba.zip |
Trim url and path of appsroot to have and standart type of path fix oc-1107
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php index 870550f267d..b4da6434e25 100644 --- a/lib/base.php +++ b/lib/base.php @@ -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)){ |