Skip to content

Node.js based forum software built for the modern web

fix: unnecessary escape

Barış Soner Uşaklıcd438b328aa3
diff --git a/src/posts/uploads.js b/src/posts/uploads.js
index 8033e8e66a..27a6c10168 100644
--- a/src/posts/uploads.js
+++ b/src/posts/uploads.js
@@ -99,7 +99,7 @@ module.exports = function (Posts) {
files = files.filter(filename => filename !== '.gitignore');
// Exclude non-timestamped files (e.g. group covers; see gh#10783/gh#10705)
- const tsPrefix = /^\d{13}\-/;
+ const tsPrefix = /^\d{13}-/;
files = files.filter(filename => tsPrefix.test(filename));
files = await Promise.all(files.map(async filename => (await Posts.uploads.isOrphan(`files/${filename}`) ? `files/${filename}` : null)));