🐛 Fix(custom): remove some filename validate rule

ISSUES CLOSED: #366
This commit is contained in:
Kuingsmile
2025-08-18 15:30:51 +08:00
parent e5b35a0520
commit 89bf29bb0a

View File

@@ -73,14 +73,6 @@ function validateFileName(fileName: string): string {
if (!fileName.trim()) {
return 'File name is required'
}
const invalidChars = /[<>:"/\\|?*]/g
if (invalidChars.test(fileName)) {
return 'File name contains invalid characters'
}
const reservedNames = /^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])$/i
if (reservedNames.test(fileName.trim())) {
return 'This is a reserved file name'
}
return ''
}