Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 828550 - Fail building gaia on windows - NS_ERROR_FILE_UNRECOGNIZ…

…ED_PATH exception
  • Loading branch information...
commit fad136fb66dc941d611e55979e0d74c318a5c817 1 parent 8c0fcf3
@ochameau ochameau authored
Showing with 13 additions and 6 deletions.
  1. +10 −5 build/utils.js
  2. +3 −1 build/webapp-l10n.js
View
15 build/utils.js
@@ -90,13 +90,18 @@ function writeContent(file, content) {
// Return an nsIFile by joining paths given as arguments
// First path has to be an absolute one
function getFile() {
- let file = new FileUtils.File(arguments[0]);
- if (arguments.length > 1) {
- for (let i = 1; i < arguments.length; i++) {
- file.append(arguments[i]);
+ try {
+ let file = new FileUtils.File(arguments[0]);
+ if (arguments.length > 1) {
+ for (let i = 1; i < arguments.length; i++) {
+ file.append(arguments[i]);
+ }
}
+ return file;
+ } catch(e) {
+ throw new Error(' -*- build/utils.js: Invalid file path (' +
+ Array.slice(arguments).join(', ') + ')\n' + e + '\n');
}
- return file;
}
function ensureFolderExists(file) {
View
4 build/webapp-l10n.js
@@ -192,7 +192,9 @@ if (GAIA_INLINE_LOCALES) {
// LOCALES_FILE is a relative path by default: shared/resources/languages.json
// -- but it can be an absolute path when doing a multilocale build.
- let file = getFile(GAIA_DIR + '/' + LOCALES_FILE);
+ // LOCALES_FILE is using unix separator, ensure working fine on win32
+ let abs_path_chunks = [GAIA_DIR].concat(LOCALES_FILE.split('/'));
+ let file = getFile.apply(null, abs_path_chunks);
if (!file.exists()) {
file = getFile(LOCALES_FILE);
}
Please sign in to comment.
Something went wrong with that request. Please try again.