diff options
Diffstat (limited to 'maintenance/generateSchemaSql.php')
-rw-r--r-- | maintenance/generateSchemaSql.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/maintenance/generateSchemaSql.php b/maintenance/generateSchemaSql.php index 0108be85e85c..14583828603e 100644 --- a/maintenance/generateSchemaSql.php +++ b/maintenance/generateSchemaSql.php @@ -62,8 +62,14 @@ class GenerateSchemaSql extends Maintenance { global $IP; $platform = $this->getOption( 'type', 'mysql' ); $jsonPath = $this->getOption( 'json', __DIR__ . '/tables.json' ); + $installPath = $IP; + // For windows + if ( DIRECTORY_SEPARATOR === '\\' ) { + $installPath = strtr( $installPath, '\\', '/' ); + $jsonPath = strtr( $jsonPath, '\\', '/' ); + } $relativeJsonPath = str_replace( - [ "$IP/extensions/", "$IP/" ], + [ "$installPath/extensions/", "$installPath/" ], '', $jsonPath ); |