Merge pull request #24 from MoeGrid/master

修复 文件名中有单引号无法上传的问题
This commit is contained in:
Suwings 2022-04-24 10:18:47 +08:00 committed by GitHub
commit ea6a37a193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ export default class FileManager {
}
public static checkFileName(fileName: string) {
const blackKeys = ["/", "\\", "|", "?", "*", ">", "<", ";", '"', "'"];
const blackKeys = ["/", "\\", "|", "?", "*", ">", "<", ";", '"'];
for (const ch of blackKeys) {
if (fileName.includes(ch)) return false;
}

View File

@ -20,7 +20,7 @@
*/
export function checkFileName(fileName: string) {
const blackKeys = ["/", "\\", "|", "?", "*", ">", "<", ";", '"', "'"];
const blackKeys = ["/", "\\", "|", "?", "*", ">", "<", ";", '"'];
for (const ch of blackKeys) {
if (fileName.includes(ch)) return false;
}