Skip to content

Commit d049ad0

Browse files
committed
fix input.json autocomplete
1 parent f2769e5 commit d049ad0

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/main/java/com/billyang/entrylib/Config/UserIO.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,25 @@ void loadFile(String fileName) {
8181
/**
8282
* 加载输入配置
8383
*/
84-
void initInput() {loadFile("input.json");}
84+
void initInput() {
85+
String fileName = "input.json";
86+
File file = new File(path, fileName);
87+
if(!file.exists()) loadFile(fileName);
88+
}
8589

8690
/**
8791
* 加载输出配置
8892
*/
89-
void initOutput() {loadFile("output.json");}
93+
void initOutput() {
94+
loadFile("output.json");
95+
}
9096

9197
/**
9298
* 加载全局配置
9399
*/
94-
void initGlobalConfig() {loadFile("global.json");}
100+
void initGlobalConfig() {
101+
loadFile("global.json");
102+
}
95103

96104
/**
97105
* 初始化

0 commit comments

Comments
 (0)