diff options
Diffstat (limited to 'maintenance/generateSchemaChangeSql.php')
-rw-r--r-- | maintenance/generateSchemaChangeSql.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/maintenance/generateSchemaChangeSql.php b/maintenance/generateSchemaChangeSql.php index 870dbe04e87f..31587029c95f 100644 --- a/maintenance/generateSchemaChangeSql.php +++ b/maintenance/generateSchemaChangeSql.php @@ -61,7 +61,13 @@ class GenerateSchemaChangeSql extends Maintenance { public function execute() { global $IP; $jsonPath = $this->getOption( 'json' ); - $relativeJsonPath = str_replace( "$IP/", '', $jsonPath ); + $installPath = $IP; + // For windows + if ( DIRECTORY_SEPARATOR === '\\' ) { + $installPath = strtr( $installPath, '\\', '/' ); + $jsonPath = strtr( $jsonPath, '\\', '/' ); + } + $relativeJsonPath = str_replace( "$installPath/", '', $jsonPath ); $sqlPath = $this->getOption( 'sql' ); $abstractSchemaChange = json_decode( file_get_contents( $jsonPath ), true ); |