mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-08-05 12:27:00 -04:00
update
This commit is contained in:
parent
310717d877
commit
f4d2eadf03
@ -203,6 +203,7 @@ public class DefaultCacheRepository extends CacheRepository {
|
|||||||
private void saveIndex() {
|
private void saveIndex() {
|
||||||
if (indexFile == null || index == null) return;
|
if (indexFile == null || index == null) return;
|
||||||
try {
|
try {
|
||||||
|
Files.createDirectories(indexFile.getParent());
|
||||||
FileUtils.saveSafely(indexFile, outputStream -> {
|
FileUtils.saveSafely(indexFile, outputStream -> {
|
||||||
try (var writer = new BufferedWriter(new OutputStreamWriter(outputStream, StandardCharsets.UTF_8))) {
|
try (var writer = new BufferedWriter(new OutputStreamWriter(outputStream, StandardCharsets.UTF_8))) {
|
||||||
JsonUtils.GSON.toJson(index, writer);
|
JsonUtils.GSON.toJson(index, writer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user