Fix MD5 comparison for nightly builds It turns out that the MD5 routine in ant, when run on Windows, uses "\r" as a delimiter for the output file format. The Installer was only filtering for "\n", as that is the delimiter in the SDK release MD5 files.
Signed-off-by: Erik de Bruin <e...@ixsoftware.nl> Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/8b4ee1bd Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/8b4ee1bd Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/8b4ee1bd Branch: refs/heads/master Commit: 8b4ee1bdd46e27be81438b822c7a1f1c3d8bf00e Parents: 8218082 Author: Erik de Bruin <e...@ixsoftware.nl> Authored: Mon Jun 17 11:53:52 2013 +0200 Committer: Erik de Bruin <e...@ixsoftware.nl> Committed: Mon Jun 17 11:53:52 2013 +0200 ---------------------------------------------------------------------- .../org/apache/flex/packageflexsdk/util/MD5CompareUtil.as | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/8b4ee1bd/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as ---------------------------------------------------------------------- diff --git a/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as b/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as index 230ca7a..884276c 100644 --- a/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as +++ b/installer/src/org/apache/flex/packageflexsdk/util/MD5CompareUtil.as @@ -195,7 +195,13 @@ public class MD5CompareUtil extends EventDispatcher if (!_errorOccurred) { _remoteMD5Value = String(_urlLoader.data); - _remoteMD5Value = _remoteMD5Value.split("\n")[0]; // we need only the first line + + /** + * We need only the first line; split for both Unix and Windows + * style line delimiters + */ + _remoteMD5Value = _remoteMD5Value.split("\n")[0]; + _remoteMD5Value = _remoteMD5Value.split("\r")[0]; compareSignatures(); }