fix: Suppress IOException when caching downloaded library. Closes #834.

This commit is contained in:
huanghongxun 2021-04-11 00:18:04 +08:00
parent c453bbc7cd
commit 2d4223f7ed

View File

@ -168,8 +168,13 @@ public class LibraryDownloadTask extends Task<Void> {
@Override
public void postExecute() throws Exception {
if (!cached)
cacheRepository.cacheLibrary(library, jar.toPath(), xz);
if (!cached) {
try {
cacheRepository.cacheLibrary(library, jar.toPath(), xz);
} catch (IOException e) {
LOG.log(Level.WARNING, "Failed to cache downloaded library " + library, e);
}
}
}
public static boolean checksumValid(File libPath, List<String> checksums) {