diff --git a/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php b/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php --- a/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php +++ b/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php @@ -51,12 +51,14 @@ $map = array(); $list = Filesystem::listDirectory($root, $include_hidden = false); foreach ($list as $file) { - $short = preg_replace('/\.png$/', '', $file); + if (preg_match('/\.png$/', $file)) { // do not add subdirectory names + $short = preg_replace('/\.png$/', '', $file); - $map[$short] = array( - 'path' => $root.$file, - 'quip' => idx($quips, $short, $short), - ); + $map[$short] = array( + 'path' => $root.$file, + 'quip' => idx($quips, $short, $short), + ); + } } return $map;