Bug 1411951 - Use mozpack.path.normsep when generating chrome entry paths for langpack manifest.json. r?mshal
MozReview-Commit-ID: L8kVm1ISkzD
--- a/python/mozbuild/mozbuild/action/langpack_manifest.py
+++ b/python/mozbuild/mozbuild/action/langpack_manifest.py
@@ -13,16 +13,17 @@ from __future__ import absolute_import
import argparse
import sys
import os
import json
import io
import datetime
import requests
import mozversioncontrol
+import mozpack.path as mozpath
from mozpack.chrome.manifest import (
Manifest,
ManifestLocale,
parse_manifest,
)
from mozbuild.preprocessor import Preprocessor
@@ -262,28 +263,29 @@ def parse_chrome_manifest(path, base_pat
for entry in parse_manifest(None, path):
if isinstance(entry, Manifest):
parse_chrome_manifest(
os.path.join(os.path.dirname(path), entry.relpath),
base_path,
chrome_entries
)
elif isinstance(entry, ManifestLocale):
+ entry_path = os.path.join(
+ os.path.relpath(
+ os.path.dirname(path),
+ base_path
+ ),
+ entry.relpath
+ )
chrome_entries.append({
'type': 'locale',
'alias': entry.name,
'locale': entry.id,
'platforms': convert_entry_flags_to_platform_codes(entry.flags),
- 'path': os.path.join(
- os.path.relpath(
- os.path.dirname(path),
- base_path
- ),
- entry.relpath
- )
+ 'path': mozpath.normsep(entry_path)
})
else:
raise Exception('Unknown type {0}'.format(entry.name))
###
# Generates a new web manifest dict with values specific for a language pack.
#