mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-15 14:56:05 -04:00
Fix #619
This commit is contained in:
parent
4737240c91
commit
a2540c2e9b
@ -178,7 +178,7 @@ public final class NetworkUtils {
|
||||
public static String detectFileName(URL url) throws IOException {
|
||||
HttpURLConnection conn = resolveConnection(createConnection(url));
|
||||
int code = conn.getResponseCode();
|
||||
if (code == 404)
|
||||
if (code / 100 == 4)
|
||||
throw new FileNotFoundException();
|
||||
if (code / 100 != 2)
|
||||
throw new IOException(url + ": response code " + conn.getResponseCode());
|
||||
|
Loading…
x
Reference in New Issue
Block a user