mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-07-06 15:59:47 +03:00
[FIX] pushUpdate: UnsupportedOperationException
This commit is contained in:
parent
bd0423460f
commit
26c21a3ec7
1 changed files with 3 additions and 3 deletions
|
@ -182,7 +182,7 @@ private void writeCache(Path file) throws IOException {
|
|||
}
|
||||
|
||||
private void readCache(Path file) throws IOException {
|
||||
Map<String, HashedDir> updatesDirMap = new HashMap<>(16);
|
||||
Map<String, HashedDir> updatesDirMap = new ConcurrentHashMap<>(16);
|
||||
try (HInput input = new HInput(IOHelper.newInput(file))) {
|
||||
int size = input.readLength(0);
|
||||
for (int i = 0; i < size; ++i) {
|
||||
|
@ -192,7 +192,7 @@ private void readCache(Path file) throws IOException {
|
|||
}
|
||||
}
|
||||
logger.debug("Found {} updates from cache", updatesDirMap.size());
|
||||
this.updatesDirMap = Collections.unmodifiableMap(updatesDirMap);
|
||||
this.updatesDirMap = updatesDirMap;
|
||||
}
|
||||
|
||||
public void readProfilesDir() throws IOException {
|
||||
|
@ -248,7 +248,7 @@ public void sync(Collection<String> dirs) throws IOException {
|
|||
newUpdatesDirMap.put(name, updateHDir);
|
||||
}
|
||||
}
|
||||
updatesDirMap = Collections.unmodifiableMap(newUpdatesDirMap);
|
||||
updatesDirMap = newUpdatesDirMap;
|
||||
if (cacheUpdates) {
|
||||
try {
|
||||
writeCache(Path.of(cacheFile));
|
||||
|
|
Loading…
Reference in a new issue