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;