Commit 349d09b7 authored by wanli's avatar wanli

🐞 fix(文件管理后端接口):

修复文件管理后端接口获取目录详情bug
parent 501aa1fb
......@@ -96,21 +96,23 @@ class FileManager(object):
"files": []
}
if target_path == None:
target_path = ''
disk_path = Path(disk_root).joinpath(disk)
else:
if target_path != None and target_path.find(disk) > 0:
disk_path = Path(disk_root)
else:
disk_path = Path(disk_root).joinpath(disk)
if not disk_path.exists():
logger.info(disk_path)
return result, ResponseCode.DIRECTORY_NOT_EXISTS
return None, ResponseCode.DIRECTORY_NOT_EXISTS
if target_path == None:
target_path = ''
target_path = Path(target_path)
target_path = disk_path.joinpath(target_path)
if not target_path.exists():
logger.info(target_path)
return result, ResponseCode.DIRECTORY_NOT_EXISTS
return None, ResponseCode.DIRECTORY_NOT_EXISTS
for child in target_path.iterdir():
if child.is_dir():
......
{"directories": [{"basename": "evm", "dirname": "uploads/evueapps", "path": "uploads/evueapps/evm", "timestamp": 1625930440, "type": "dir"}], "files": []}
\ No newline at end of file
{"directories": [{"basename": "evm", "dirname": "evueapps", "path": "evueapps/evm", "timestamp": 1625930440, "type": "dir"}], "files": []}
\ No newline at end of file
......@@ -241,7 +241,7 @@ export default {
});
},
edit(record) {
this.$router.push({ name: "FileManager", params: { directory: record.file_dir } })
this.$router.push({ name: "FileManager", params: { directory: record.file_dir, disk: "uploads" } })
},
resetForm() {
this.query = {
......
......@@ -119,6 +119,9 @@ export default {
EventBus.$emit('keyMonitor', event);
});
*/
// 切换目录
},
destroyed() {
// reset state
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment