Skip to content

Commit 029b4f7

Browse files
authored
Check for DIRECTORY_SEPARATOR
Based on fix from @nuessgens at wpengine#201
1 parent 3cd816b commit 029b4f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/wpephpcompat.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,10 @@ public function clean_after_scan() {
464464
* @return null
465465
*/
466466
private function add_directory( $name, $path ) {
467+
if (DIRECTORY_SEPARATOR == '\\') {
468+
$path = str_replace("\\","/", $path);
469+
}
470+
467471
$dir = array(
468472
'post_title' => $name,
469473
'post_content' => $path,

0 commit comments

Comments
 (0)