Commit d91cf92
committed
fix: 修复空文件下载时 FileAlreadyExistsException 和 WebdavProtocol 调试代码遗留问题
问题1: FileAlreadyExistsException
- 位置: Work.java:438-444
- 原因: 下载空文件时,如果临时文件已存在(上次更新中断残留),Files.createFile() 会抛出异常导致程序崩溃
- 修复: 创建前先检查文件是否存在,存在则删除再创建
问题2: WebdavProtocol 调试代码遗留
- 位置: WebdavProtocol.java:137-141
- 原因: 代码中遗留了调试代码,条件 desc.length() > -999 永远为 true,导致 Webdav 协议下载文件时必定抛出异常,完全无法使用
- 修复: 删除遗留的调试代码1 parent 3bcfd6c commit d91cf92
2 files changed
Lines changed: 4 additions & 5 deletions
File tree
- src/main/java/com/github/balloonupdate/mcpatch/client
- network/impl
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
439 | 443 | | |
440 | 444 | | |
441 | 445 | | |
| |||
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | 137 | | |
143 | 138 | | |
144 | 139 | | |
| |||
0 commit comments