Skip to content

Commit a1b7912

Browse files
committed
normalize path
1 parent 0cba4f7 commit a1b7912

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Site_Command.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ public function empty_( $args, $assoc_args ) {
247247
foreach ( $files as $fileinfo ) {
248248
$realpath = $fileinfo->getRealPath();
249249
// Don't clobber subsites when operating on the main site
250-
if ( $is_main_site && false !== stripos( $realpath, '/sites/' ) ) {
250+
$normalized_realpath = str_replace( '\\', '/', $realpath );
251+
if ( $is_main_site && false !== stripos( $normalized_realpath, '/sites/' ) ) {
251252
continue;
252253
}
253254
if ( $fileinfo->isDir() ) {

0 commit comments

Comments
 (0)