mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 10:40:40 -04:00
don't call OC_Filesystem::normalizePath() but simply remove trailing slashes.
(OC_Filesystem::normalizePath() triggers some strange side effects)
This commit is contained in:
parent
cc67ae9dbb
commit
2e5ce9f4ec
1 changed files with 8 additions and 2 deletions
|
|
@ -24,12 +24,18 @@ if (isset($_GET['token'])) {
|
|||
if (isset($_GET['file']) || isset($_GET['dir'])) {
|
||||
if (isset($_GET['dir'])) {
|
||||
$type = 'folder';
|
||||
$path = OC_Filesystem::normalizePath($_GET['dir']);
|
||||
$path = $_GET['dir'];
|
||||
if($stripTrailingSlash and strlen($path)>1 and substr($path,-1,1)==='/') {
|
||||
$path=substr($path,0,-1);
|
||||
}
|
||||
$baseDir = $path;
|
||||
$dir = $baseDir;
|
||||
} else {
|
||||
$type = 'file';
|
||||
$path = OC_Filesystem::normalizePath($_GET['file']);
|
||||
$path = $_GET['file'];
|
||||
if($stripTrailingSlash and strlen($path)>1 and substr($path,-1,1)==='/') {
|
||||
$path=substr($path,0,-1);
|
||||
}
|
||||
}
|
||||
$uidOwner = substr($path, 1, strpos($path, '/', 1) - 1);
|
||||
if (OCP\User::userExists($uidOwner)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue