From 907b62a232ad40eb5221e36ac288afa2443505b2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 02:51:06 +0000 Subject: [PATCH 1/3] Initial plan From a57fe0ed57ab6337bbda3e6ffeb7fe86a2e370fe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 02:52:46 +0000 Subject: [PATCH 2/3] Fix Windows path separator issue in handle_imports Co-authored-by: dd32 <767313+dd32@users.noreply.github.com> --- class.add-from-server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class.add-from-server.php b/class.add-from-server.php index b63afe5..77e7da2 100644 --- a/class.add-from-server.php +++ b/class.add-from-server.php @@ -135,7 +135,7 @@ function handle_imports() { foreach ( (array)$files as $file ) { $filename = trailingslashit( $root ) . ltrim( $file, '/' ); - if ( $filename !== realpath( $filename ) ) { + if ( wp_normalize_path( $filename ) !== wp_normalize_path( realpath( $filename ) ) ) { continue; } From cb2b8a8e5e8eda84289a5d3b050f9dc8d62f5c55 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 02:54:13 +0000 Subject: [PATCH 3/3] Improve realpath check to explicitly handle false case Co-authored-by: dd32 <767313+dd32@users.noreply.github.com> --- class.add-from-server.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/class.add-from-server.php b/class.add-from-server.php index 77e7da2..377e06c 100644 --- a/class.add-from-server.php +++ b/class.add-from-server.php @@ -135,7 +135,8 @@ function handle_imports() { foreach ( (array)$files as $file ) { $filename = trailingslashit( $root ) . ltrim( $file, '/' ); - if ( wp_normalize_path( $filename ) !== wp_normalize_path( realpath( $filename ) ) ) { + $realpath = realpath( $filename ); + if ( ! $realpath || wp_normalize_path( $filename ) !== wp_normalize_path( $realpath ) ) { continue; }