mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-09 11:55:52 -04:00
Update CacheRepository.java (#2756)
* Update CacheRepository.java
e96dd55395
* Update CacheRepository.java
* Update CacheRepository.java
* Update CacheRepository.java
* Update CacheRepository.java
* update
---------
Co-authored-by: Glavo <zjx001202@gmail.com>
This commit is contained in:
parent
8e3c19651e
commit
7de07319d9
@ -287,7 +287,7 @@ public class CacheRepository {
|
||||
}
|
||||
|
||||
public void saveETagIndex() throws IOException {
|
||||
try (FileChannel channel = FileChannel.open(indexFile, StandardOpenOption.READ, StandardOpenOption.WRITE)) {
|
||||
try (FileChannel channel = FileChannel.open(indexFile, StandardOpenOption.CREATE, StandardOpenOption.READ, StandardOpenOption.WRITE)) {
|
||||
FileLock lock = channel.lock();
|
||||
try {
|
||||
ETagIndex indexOnDisk = JsonUtils.fromMaybeMalformedJson(new String(IOUtils.readFullyWithoutClosing(Channels.newInputStream(channel)), UTF_8), ETagIndex.class);
|
||||
|
Loading…
x
Reference in New Issue
Block a user