修复新建文件

This commit is contained in:
hanhh 2021-09-20 00:59:38 +08:00
parent 265760146f
commit 900d279bf6

View File

@ -81,7 +81,9 @@ export default (app: Router) => {
data: '文件路径禁止访问',
});
}
if (!originFilename) {
originFilename = filename;
}
const originFilePath = `${path}${originFilename.replace(/\//g, '')}`;
const filePath = `${path}${filename.replace(/\//g, '')}`;
if (fs.existsSync(originFilePath)) {