From 90914d5850e062b693335c34b386dd0802692bc7 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Wed, 9 Dec 2020 17:39:46 +0100 Subject: Improve path resolving Signed-off-by: Richard Steinmetz --- Changelog.md | 3 +++ appinfo/info.xml | 2 +- lib/Controller/ChecksumController.php | 7 ++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Changelog.md b/Changelog.md index d5ef8b5..ee9c001 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,9 @@ Changelog ========= +**1.0.1** +- Improve path resolving + **1.0.0** - Bump nextcloud support to 21 - Drop owncloud support diff --git a/appinfo/info.xml b/appinfo/info.xml index d082361..5f5df2d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -14,7 +14,7 @@ Open the details view of the file (sidebar). There should be a new tab called "Checksum". Select an algorithm and it will try to generate a hash. - 1.0.0 + 1.0.1 agpl westberliner Richard Steinmetz diff --git a/lib/Controller/ChecksumController.php b/lib/Controller/ChecksumController.php index 91e7f0f..6c491c2 100644 --- a/lib/Controller/ChecksumController.php +++ b/lib/Controller/ChecksumController.php @@ -117,13 +117,14 @@ class ChecksumController extends Controller { return null; } - $mount = $this->mountManager->find($user->getUID()); + $absPath = $user->getUID() . '/files/' . $source; + $mount = $this->mountManager->find($absPath); if (!$mount) { return null; } - $path = '/files/' . $source; - $file = $mount->getStorage()->fopen($path, 'rb'); + $internalPath = $mount->getInternalPath($absPath); + $file = $mount->getStorage()->fopen($internalPath, 'rb'); if (!$file) { return null; } -- cgit v1.2.3