Skip to content

Commit

Permalink
Merge pull request #27271 from owncloud/fix-trash-tooltip
Browse files Browse the repository at this point in the history
In the real world id is an initial filename
  • Loading branch information
Vincent Petry committed Feb 28, 2017
2 parents e064855 + f71cd07 commit 4a77379
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/files_trashbin/lib/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ public static function getTrashFiles($dir, $user, $sortAttribute = '', $sortDesc
$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);
}
Expand All @@ -89,7 +90,7 @@ public static function getTrashFiles($dir, $user, $sortAttribute = '', $sortDesc
'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);
}
Expand Down

0 comments on commit 4a77379

Please sign in to comment.