From f10625f8bc59e3ae52da07fdba910329fad540a3 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Fri, 12 Feb 2016 02:29:33 +0100 Subject: [PATCH] file and avatar dirs on instances with no such dirs in filesystem --- lib/nickname.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/nickname.php b/lib/nickname.php index c49ce20f5e..2dd08efc3f 100644 --- a/lib/nickname.php +++ b/lib/nickname.php @@ -191,6 +191,12 @@ class Nickname $paths[$matches[1]] = true; } } + + // FIXME: this assumes the 'path' is in the first-level directory, though common it's not certain + foreach (['avatar', 'attachments'] as $cat) { + $paths[basename(common_config($cat, 'path'))] = true; + } + return in_array($str, array_keys($paths)); }