代码提交

This commit is contained in:
张家训
2026-06-16 17:41:14 +08:00
parent 089558ddcd
commit a641796a0b
19 changed files with 99 additions and 230 deletions
@@ -27,7 +27,7 @@ import java.util.Properties;
@Component
public class ExternalConfigManager {
static final String CONFIG_FILE_NAME = "workutils.config";
static final String CONFIG_FILE_NAME = "data/workutils.config";
// ---- 系统路径 ----
public static final String KEY_BASE_DIR = "base-directory";
@@ -215,10 +215,12 @@ public class WorkUtilsProperties {
* 无法读取模板时则创建空文件。
*/
private void ensureDataFilesExist() {
ensureDataFile(getProjectPathsFilePath(), "config/project_paths.txt", "项目路径文件");
ensureDataFile(getDamagedReposFilePath(), "config/damaged_repos.cache", "损坏缓存文件");
ensureDataFile(getProjectPathsFilePath(), TEMPLATES_PATH + "project_paths.txt", "项目路径文件");
ensureDataFile(getDamagedReposFilePath(), TEMPLATES_PATH + "damaged_repos.cache", "损坏缓存文件");
}
private static final String TEMPLATES_PATH = "templates/";
private void ensureDataFile(Path target, String classpathResource, String label) {
try {
if (Files.exists(target)) return;