1
0
Fork 0

sort assets deterministically

This commit is contained in:
Jan Steemann 2013-05-13 11:28:58 +02:00
parent 8b16ec6e18
commit aa4aaf6500
1 changed files with 9 additions and 0 deletions

View File

@ -77,6 +77,12 @@ function buildAssetContent (app, assets) {
if (match !== null) {
m = fs.listTree(fs.join(rootDir, match[1]));
// files are sorted in file-system order.
// this makes the order non-portable
// we'll be sorting the files now using JS sort
// so the order is more consistent across multiple platforms
m.sort();
for (i = 0; i < m.length; ++i) {
var filename = fs.join(rootDir, match[1], m[i]);
@ -509,6 +515,9 @@ exports.scanAppDirectory = function () {
var files = fs.list(path);
// note: files do not have a determinstic order, but it doesn't matter here
// as we're treating individual Foxx apps and their order is irrelevant
for (j = 0; j < files.length; ++j) {
var m = fs.join(path, files[j], "manifest.json");