From 1dfd1b9cd4cc0f8566ee12a18f8abb9657eebb18 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 6 May 2022 14:19:42 -0500 Subject: [PATCH 1/2] SFTP: try to delete dir even if it can't be opened --- phpseclib/Net/SFTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 7d488d89..a08b1b5e 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -2764,7 +2764,7 @@ class Net_SFTP extends Net_SSH2 // normally $entries would have at least . and .. but it might not if the directories // permissions didn't allow reading if (empty($entries)) { - return false; + $entries = array(); } unset($entries['.'], $entries['..']); From 715bb9ff97842b4d6e5d7a8b91b309069dc60428 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 6 May 2022 14:26:57 -0500 Subject: [PATCH 2/2] SFTP: CS adjustment --- phpseclib/Net/SFTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index ac96d4c4..c75d4e89 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -2516,7 +2516,7 @@ class SFTP extends SSH2 // normally $entries would have at least . and .. but it might not if the directories // permissions didn't allow reading if (empty($entries)) { - $entries = array(); + $entries = []; } unset($entries['.'], $entries['..']);