Use is_file() as file_exists() also checks whether a directory exists

This commit is contained in:
Zach Borboa
2019-05-11 09:40:02 -07:00
parent 52a8645872
commit 03d4ffea4f
+1 -1
View File
@@ -305,7 +305,7 @@ class Curl
$mode = 'wb';
// Attempt to resume download only when a temporary download file exists and is not empty.
if (file_exists($download_filename) && $filesize = filesize($download_filename)) {
if (is_file($download_filename) && $filesize = filesize($download_filename)) {
$mode = 'ab';
$first_byte_position = $filesize;
$range = $first_byte_position . '-';