diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2020-12-09 19:39:46 +0300 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2020-12-09 19:42:37 +0300 |
commit | 90914d5850e062b693335c34b386dd0802692bc7 (patch) | |
tree | ab31900bdfeebae4807778b753f704d401851045 | |
parent | 037952bea94d78f3eb6cff8d95c4e94a8a059141 (diff) |
Improve path resolvingv1.0.1
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
-rw-r--r-- | Changelog.md | 3 | ||||
-rw-r--r-- | appinfo/info.xml | 2 | ||||
-rw-r--r-- | 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. </description> - <version>1.0.0</version> + <version>1.0.1</version> <licence>agpl</licence> <author>westberliner</author> <author>Richard Steinmetz</author> 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; } |