Make WordPress Core

Ticket #26091: 26091.patch

File 26091.patch, 933 bytes (added by SergeyBiryukov, 10 years ago)
  • tests/phpunit/includes/mock-fs.php

     
    8181         * Locates a filesystem node for the parent of the given item
    8282         */
    8383        private function locate_parent_node( $path ) {
    84                 return $this->locate_node( trailingslashit( dirname( $path ) ) );
     84                $dirname = str_replace( '\\', '/', dirname( $path ) );
     85                return $this->locate_node( trailingslashit( $dirname ) );
    8586        }
    8687
    8788        // Here starteth the WP_Filesystem functions.
     
    9192
    9293                $parent_node = $this->locate_parent_node( $path );
    9394                if ( ! $parent_node ) {
    94                         $this->mkdir( dirname( $path ) );
     95                        $dirname = str_replace( '\\', '/', dirname( $path ) );
     96                        $this->mkdir( $dirname );
    9597                        $parent_node = $this->locate_parent_node( $path );
    9698                        if ( ! $parent_node )
    9799                                return false;