diff --git a/bin/classmap_generator.php b/bin/classmap_generator.php index 91a8d199edf..3b9a30df5f5 100644 --- a/bin/classmap_generator.php +++ b/bin/classmap_generator.php @@ -81,7 +81,7 @@ $libraryPath = ''; if (isset($opts->l)) { $libraryPath = $opts->l; - $libraryPath = rtrim($libraryPath, '/\\') . '/'; + $libraryPath = rtrim($libraryPath, '/\\') . DIRECTORY_SEPARATOR; if (!is_dir($libraryPath)) { echo "Invalid library directory provided" . PHP_EOL . PHP_EOL; echo $opts->getUsageMessage(); @@ -134,7 +134,7 @@ iterator_apply($l, function() use ($l, $map, $strip, $libraryPath){ $file = $l->current(); $namespace = empty($file->namespace) ? '' : $file->namespace . '\\'; - $filename = str_replace($strip, '', $file->getPath() . '/' . $file->getFilename()); + $filename = str_replace($strip, '', $file->getPath() . DIRECTORY_SEPARATOR . $file->getFilename()); // Add in relative path to library $filename = $libraryPath . $filename;