Skip to content

Commit

Permalink
make edw work on windows too
Browse files Browse the repository at this point in the history
  • Loading branch information
mnelson4 committed Aug 23, 2021
1 parent dce2893 commit bafe75a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eight-day-week.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function edw_bootstrap() {
return;
}

$core_file = EDW_INC . 'functions/core.php';
$core_file = EDW_INC . 'functions' . DIRECTORY_SEPARATOR . 'core.php';

if( ! isset( $map[ $core_file ] ) ) {
return;
Expand Down Expand Up @@ -139,10 +139,10 @@ function edw_build_namespace_map() {

$path = $file->getPathInfo()->getPathname();
if( $dir !== $path ) {
$sub_directory = str_replace( $dir . '/', '', $path );
$sub_directory = str_replace( $dir . DIRECTORY_SEPARATOR, '', $path );

//convert slashes to spaces
$capitalized = ucwords( str_replace( '/', ' ', $sub_directory ) );
$capitalized = ucwords( str_replace( DIRECTORY_SEPARATOR, ' ', $sub_directory ) );

$tip_of_the_iceberg = str_replace( ' ', '\\', $capitalized ) . '\\' . $tip_of_the_iceberg;
}
Expand Down

0 comments on commit bafe75a

Please sign in to comment.