mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-03-07 17:36:52 +08:00
fix import curse forge modpack without modlist.html
This commit is contained in:
parent
624d21c4dc
commit
84570c5024
@ -227,7 +227,7 @@ public final class CompressingUtils {
|
|||||||
public static Optional<String> readTextZipEntryQuietly(File file, String name) {
|
public static Optional<String> readTextZipEntryQuietly(File file, String name) {
|
||||||
try {
|
try {
|
||||||
return Optional.of(readTextZipEntry(file, name));
|
return Optional.of(readTextZipEntry(file, name));
|
||||||
} catch (IOException e) {
|
} catch (IOException | NullPointerException e) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@ public final class CompressingUtils {
|
|||||||
public static Optional<String> readTextZipEntryQuietly(Path file, String name, Charset encoding) {
|
public static Optional<String> readTextZipEntryQuietly(Path file, String name, Charset encoding) {
|
||||||
try {
|
try {
|
||||||
return Optional.of(readTextZipEntry(file, name, encoding));
|
return Optional.of(readTextZipEntry(file, name, encoding));
|
||||||
} catch (IOException e) {
|
} catch (IOException | NullPointerException e) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user