Fixed bug that caused downloads from sites that support download resuming to fail with 'Server doesn't support resuming downloads'

This commit is contained in:
cyian-1756 2018-06-27 02:05:36 -04:00
parent af064ee435
commit ffbda6032d

View File

@ -130,7 +130,7 @@ class DownloadFileThread extends Thread {
int statusCode = huc.getResponseCode();
logger.debug("Status code: " + statusCode);
if (statusCode != 206 && observer.tryResumeDownload()) {
if (statusCode != 206 && observer.tryResumeDownload() && saveAs.exists()) {
// TODO find a better way to handle servers that don't support resuming downloads then just erroring out
throw new IOException("Server doesn't support resuming downloads");
}