We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17a6032 commit ce9a726Copy full SHA for ce9a726
src/Core_Command.php
@@ -1972,6 +1972,12 @@ private function remove_old_files_from_list( $files ) {
1972
1973
$file_path = ABSPATH . $file;
1974
1975
+ // Short-circuit early: skip expensive realpath validation if the path
1976
+ // doesn't exist and isn't a (potentially broken) symlink.
1977
+ if ( ! file_exists( $file_path ) && ! is_link( $file_path ) ) {
1978
+ continue;
1979
+ }
1980
+
1981
// For symlinks, validate the symlink itself is within ABSPATH (not where it points)
1982
// For other files, validate the real path is within ABSPATH
1983
if ( is_link( $file_path ) ) {
0 commit comments