]> source.dussan.org Git - nextcloud-server.git/commitdiff
make root the default parameter for getAbsolutePath()
authorBjörn Schießle <schiessle@owncloud.com>
Wed, 7 Nov 2012 15:39:56 +0000 (16:39 +0100)
committerBjörn Schießle <schiessle@owncloud.com>
Wed, 7 Nov 2012 15:39:56 +0000 (16:39 +0100)
lib/filesystem.php
lib/filesystemview.php

index 172cc35c20cc20468ae274620b2b81c78d439861..f54cc6492e7e42dc52563366e16f34c6005baa01 100644 (file)
@@ -562,7 +562,7 @@ class OC_Filesystem{
                if ($root) { // reduce path to the required part of it (no 'username/files')
                        $fakeRootView = new OC_FilesystemView($root);
                        $count = 1;
-                       $path=str_replace(OC_App::getStorage("files")->getAbsolutePath(''), "", $fakeRootView->getAbsolutePath($path), $count);
+                       $path=str_replace(OC_App::getStorage("files")->getAbsolutePath(), "", $fakeRootView->getAbsolutePath($path), $count);
                }
 
                $path = self::normalizePath($path);
index 776c859412fe03c320439dc8eaf20d3b1cc74541..d34fbf846764dac48bec7289c6e28f98a04d1b7c 100644 (file)
@@ -47,10 +47,7 @@ class OC_FilesystemView {
                $this->fakeRoot=$root;
        }
 
-       public function getAbsolutePath($path) {
-               if(!$path) {
-                       $path='/';
-               }
+       public function getAbsolutePath($path = '/') {
                if($path[0]!=='/') {
                        $path='/'.$path;
                }