From 9a090a9a197faae36d1b5ef716e8969e8eafef67 Mon Sep 17 00:00:00 2001
From: Max Kellermann <mk@cm4all.com>
Date: Fri, 4 Feb 2022 13:55:17 +0100
Subject: [PATCH 2/5] class-wp-filesystem-direct: remove unnecessary
is_dir()/is_readable() calls
If either were not true, the dir() call would just fail, which is just
as good, but it saves two system calls.
---
src/wp-admin/includes/class-wp-filesystem-direct.php | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/wp-admin/includes/class-wp-filesystem-direct.php b/src/wp-admin/includes/class-wp-filesystem-direct.php
index 49a51b0ccd..b4b6e7f499 100644
a
|
b
|
class WP_Filesystem_Direct extends WP_Filesystem_Base { |
606 | 606 | $limit_file = false; |
607 | 607 | } |
608 | 608 | |
609 | | if ( ! $this->is_dir( $path ) || ! $this->is_readable( $path ) ) { |
610 | | return false; |
611 | | } |
612 | | |
613 | 609 | $dir = dir( $path ); |
614 | 610 | |
615 | 611 | if ( ! $dir ) { |