Skip to content

Commit

Permalink
Check for DIRECTORY_SEPARATOR
Browse files Browse the repository at this point in the history
Based on fix from @nuessgens at wpengine#201
  • Loading branch information
greatquux committed May 7, 2019
1 parent 3cd816b commit 029b4f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wpephpcompat.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,10 @@ public function clean_after_scan() {
* @return null
*/
private function add_directory( $name, $path ) {
if (DIRECTORY_SEPARATOR == '\\') {
$path = str_replace("\\","/", $path);
}

$dir = array(
'post_title' => $name,
'post_content' => $path,
Expand Down

0 comments on commit 029b4f7

Please sign in to comment.