Fix test for .cur/.ani

This commit is contained in:
Jordan Eldredge 2022-10-04 07:18:41 -07:00
parent d27ddcb16b
commit 8a7f38b2c6

View file

@ -331,7 +331,7 @@ export default class SkinModel {
// Includes custom cursors
async hasCur(): Promise<boolean> {
const matcher = new RegExp(`^.(cur)$`, "i");
const matcher = new RegExp(`.(cur)$`, "i");
const archiveFiles = await this.getArchiveFiles();
return archiveFiles.some((file) => {
return matcher.test(file.getFileName());
@ -357,7 +357,7 @@ export default class SkinModel {
async hasAni(): Promise<boolean> {
// Note: This should be expanded to check for animated cursors that use the
// .cur extension (but are actually .ani under the hood).
const matcher = new RegExp(`^.(ani)$`, "i");
const matcher = new RegExp(`.(ani)$`, "i");
const archiveFiles = await this.getArchiveFiles();
return archiveFiles.some((file) => {
return matcher.test(file.getFileName());