From f23a800f83adfcc74f2570d327d01f41c0860b28 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 3 Feb 2022 15:39:33 +0200 Subject: [PATCH] add missing $relpath --- api/src/Etemplate/Widget/Vfs.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Vfs.php b/api/src/Etemplate/Widget/Vfs.php index ec2062d0aa..faada6c2ab 100644 --- a/api/src/Etemplate/Widget/Vfs.php +++ b/api/src/Etemplate/Widget/Vfs.php @@ -79,12 +79,14 @@ class Vfs extends File /** * Find all attachments, can be used to prepare the data for the widget on client-side * - * @param string $path eg. "/apps/$app/$id/$rel_path" + * @param string $path eg. "/apps/$app/$id/$relpath" * @return array * @throws Api\Exception\AssertionFailed */ public static function findAttachments($path) { + list(,,,, $relpath) = explode('/', $path, 5); + $value = []; // Single file, already existing if (substr($path,-1) != '/' && Api\Vfs::file_exists($path) && !Api\Vfs::is_dir($path))