summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2017-02-27 22:00:47 +0300
committerMorris Jobke <hey@morrisjobke.de>2017-03-20 00:06:32 -0600
commit17bed297dba2d46ee66696d6a76257fd3bea733b (patch)
tree5c0ed76b26942b95adddd2497ed0f3ed04ecf30c /apps/files_trashbin/lib
parent528a903a7b23ea628e6ec2fc9a221821297c0bec (diff)
downloadnextcloud-server-17bed297dba2d46ee66696d6a76257fd3bea733b.tar.gz
nextcloud-server-17bed297dba2d46ee66696d6a76257fd3bea733b.zip
In the real world id is an initial filename
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r--apps/files_trashbin/lib/Helper.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_trashbin/lib/Helper.php b/apps/files_trashbin/lib/Helper.php
index 9c312443164..faf84369e72 100644
--- a/apps/files_trashbin/lib/Helper.php
+++ b/apps/files_trashbin/lib/Helper.php
@@ -72,8 +72,9 @@ class Helper {
$timestamp = substr(pathinfo($parts[0], PATHINFO_EXTENSION), 1);
}
$originalPath = '';
- if (isset($originalLocations[$id][$timestamp])) {
- $originalPath = $originalLocations[$id][$timestamp];
+ $originalName = substr($entryName, 0, -strlen($timestamp)-2);
+ if (isset($originalLocations[$originalName][$timestamp])) {
+ $originalPath = $originalLocations[$originalName][$timestamp];
if (substr($originalPath, -1) === '/') {
$originalPath = substr($originalPath, 0, -1);
}
@@ -90,7 +91,7 @@ class Helper {
'permissions' => Constants::PERMISSION_ALL - Constants::PERMISSION_SHARE
);
if ($originalPath) {
- $i['extraData'] = $originalPath . '/' . $id;
+ $i['extraData'] = $originalPath . '/' . $originalName;
}
$result[] = new FileInfo($absoluteDir . '/' . $i['name'], $storage, $internalPath . '/' . $i['name'], $i, $mount);
}