summaryrefslogtreecommitdiff
path: root/packages/backend/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-12-29 17:04:13 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-12-29 17:04:13 +0900
commit3e00ce0d88b5ef6adf7a44de91e43a623b23eef6 (patch)
tree60c66a86c18c5de9c611f1832406ba5dce5995a0 /packages/backend/src
parent12.101.0 (diff)
downloadsharkey-3e00ce0d88b5ef6adf7a44de91e43a623b23eef6.tar.gz
sharkey-3e00ce0d88b5ef6adf7a44de91e43a623b23eef6.tar.bz2
sharkey-3e00ce0d88b5ef6adf7a44de91e43a623b23eef6.zip
fix(server): エクスポートした絵文字の拡張子がfalseになることがあるのを修正
Diffstat (limited to 'packages/backend/src')
-rw-r--r--packages/backend/src/queue/processors/db/export-custom-emojis.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/backend/src/queue/processors/db/export-custom-emojis.ts b/packages/backend/src/queue/processors/db/export-custom-emojis.ts
index 925b187970..3930b9d6d4 100644
--- a/packages/backend/src/queue/processors/db/export-custom-emojis.ts
+++ b/packages/backend/src/queue/processors/db/export-custom-emojis.ts
@@ -65,7 +65,8 @@ export async function exportCustomEmojis(job: Bull.Job, done: () => void): Promi
for (const emoji of customEmojis) {
const exportId = ulid().toLowerCase();
- const emojiPath = path + '/' + exportId + '.' + mime.extension(emoji.type);
+ const ext = mime.extension(emoji.type);
+ const emojiPath = path + '/' + exportId + (ext ? '.' + ext : '');
fs.writeFileSync(emojiPath, '', 'binary');
let downloaded = false;