Skip to content

Commit 03d4ffe

Browse files
committed
Use is_file() as file_exists() also checks whether a directory exists
1 parent 52a8645 commit 03d4ffe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Curl/Curl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function download($url, $mixed_filename)
305305

306306
$mode = 'wb';
307307
// Attempt to resume download only when a temporary download file exists and is not empty.
308-
if (file_exists($download_filename) && $filesize = filesize($download_filename)) {
308+
if (is_file($download_filename) && $filesize = filesize($download_filename)) {
309309
$mode = 'ab';
310310
$first_byte_position = $filesize;
311311
$range = $first_byte_position . '-';

0 commit comments

Comments
 (0)