if (isset($_GET['file']) || isset($_GET['dir'])) {
if (isset($_GET['dir'])) {
$type = 'folder';
- $path = OC_Filesystem::normalizePath($_GET['dir']);
+ $path = $_GET['dir'];\r
+ if(strlen($path)>1 and substr($path,-1,1)==='/') {\r
+ $path=substr($path,0,-1);\r
+ }
$baseDir = $path;
$dir = $baseDir;
} else {
$type = 'file';
- $path = OC_Filesystem::normalizePath($_GET['file']);
+ $path = $_GET['dir'];\r
+ if(strlen($path)>1 and substr($path,-1,1)==='/') {\r
+ $path=substr($path,0,-1);\r
+ }
}
$uidOwner = substr($path, 1, strpos($path, '/', 1) - 1);
if (OCP\User::userExists($uidOwner)) {