Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
4ra1n committed Mar 13, 2023
1 parent 562ad2c commit bef30a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ Others:
## 1.6

更新内容:
- [bug] 备份xray目录原来的config.yaml文件 #152
- [feat] RAD 联动支持拖拽功能 #151
- [feat] request 支持自定义 user-agent #149
- [feat] 允许设置请求Cookie内容 #150
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/chaitin/xray/utils/XrayUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public static void rmAllConfig(String targetDir) {
// do not delete current config.yaml
if (!thisPath.toFile().getAbsolutePath().equals(
xrayPath.toFile().getAbsolutePath())) {
// 保留
Path backPath = Paths.get(xrayPath + Const.ConfigYaml + ".bak");
Files.write(backPath, Files.readAllBytes(xrayPath));
Files.delete(xrayPath);
}
} catch (Exception ignored) {
Expand Down

0 comments on commit bef30a1

Please sign in to comment.