mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-01-24 15:14:01 +08:00
fs_fix bug
This commit is contained in:
parent
865d9d02bb
commit
6c2bac046a
@ -99,7 +99,7 @@ router.post('/rename', (req, res) => {
|
||||
|
||||
|
||||
const multiparty = require('multiparty');
|
||||
router.get('/upload', (req, res) => {
|
||||
router.post('/upload', (req, res) => {
|
||||
//权限判断,需要登录
|
||||
if (!req.session.fsos || !req.session.fsos.cwd) return;
|
||||
let fileOperate;
|
||||
|
@ -10,7 +10,7 @@ class FileOperateStructure {
|
||||
|
||||
class UseFileOperate {
|
||||
constructor(fileOperateStructure) {
|
||||
if (!(fileOperateStructure instanceof FileOperateStructure)) {
|
||||
if (!fileOperateStructure || !fileOperateStructure['rootPath']) {
|
||||
throw new Error("[UseFileOperate Mineself Error] UseFileOperate(...) Not is FileOperateStructure");
|
||||
}
|
||||
this.fileOperate = new FileOperate(fileOperateStructure.rootPath);
|
||||
|
Loading…
Reference in New Issue
Block a user