From fb6aa78ae8d49ffc18293483379f501bac3656fd Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Wed, 4 Aug 2021 19:26:48 +0100 Subject: [PATCH] [CORE][GSFile] Allow storing files under /file --- src/Core/GSFile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/GSFile.php b/src/Core/GSFile.php index a1fb69a0ab..4ce5904fd5 100644 --- a/src/Core/GSFile.php +++ b/src/Core/GSFile.php @@ -70,8 +70,8 @@ class GSFile ?string $title = null, bool $is_local = true): Attachment { - if (!Formatting::startsWith($dest_dir, Common::config('attachments', 'dir'))) { - throw new \InvalidArgumentException("Attempted to store an attachment to a folder outside the GNU social attachment location: {$dest_dir}"); + if (!Formatting::startsWith($dest_dir, Common::config('storage', 'dir'))) { + throw new \InvalidArgumentException("Attempted to store a file in a directory outside the GNU social files location: {$dest_dir}"); } $hash = null;