fix 修改项目日志路径如果文件夹不存在报错

This commit is contained in:
bwcx_jzy 2024-01-18 21:51:33 +08:00
parent 7af8a40841
commit b6e0ed287a
No known key found for this signature in database
GPG Key ID: E187D6E9DDDE8C53
3 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,13 @@
# 🚀 版本日志
## 2.11.2.0
### 🐞 解决BUG、优化功能
1. 【agent】修复 修改项目日志路径如果文件夹不存在报错(感谢@长弘)
------
## 2.11.1.5 (2024-01-18)
### 🐞 解决BUG、优化功能

View File

@ -239,6 +239,7 @@ public class ManageEditProjectController extends BaseAgentController {
// 正在运行的项目不能修改路径
this.projectMustNotRun(old, "正在运行的项目不能修改路径");
if (oldLib.exists()) {
FileUtil.mkdir(newLib);
FileUtils.tempMoveContent(oldLib, newLib);
}
}
@ -258,6 +259,7 @@ public class ManageEditProjectController extends BaseAgentController {
File oldLogBack = projectInfoService.resolveLogBack(old);
if (oldLogBack.exists()) {
File logBack = projectInfoService.resolveLogBack(news);
FileUtil.mkdir(logBack);
FileUtils.tempMoveContent(oldLogBack, logBack);
}
}

View File

@ -58,7 +58,7 @@
</template>
</a-dropdown>
<a-dropdown :disabled="!Object.keys(this.tempNode).length">
<a-button size="small" type="primary" @click="(e) => e.preventDefault()">新建</a-button>
<a-button size="small" type="primary" @click="(e) => e.preventDefault()"><PlusOutlined />新建</a-button>
<template v-slot:overlay>
<a-menu>
<a-menu-item @click="handleAddFile(1)">