fs_fix bug

This commit is contained in:
suwings 2018-04-03 09:44:05 +08:00
parent 865d9d02bb
commit 6c2bac046a
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);