Skip to content

Commit

Permalink
changes md5 module for more efficient md5hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbot committed Dec 19, 2013
1 parent eefb31e commit 005f9ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/devices/android/android-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var logger = require('../../server/logger.js').get('appium')
, status = require("../../server/status.js")
, fs = require('fs')
, path = require('path')
, md5 = require('MD5')
, md5 = require('md5calculator')
, async = require('async');

var logTypesSupported = {
Expand Down Expand Up @@ -167,9 +167,8 @@ androidCommon.installApp = function(cb) {
};

androidCommon.getAppMd5 = function(cb) {
fs.readFile(this.apkPath, function(err, buffer) {
md5(this.apkPath, function (err, md5Hash) {
if (err) return cb(err);
var md5Hash = md5(buffer);
logger.info("MD5 for app is " + md5Hash);
cb(null, md5Hash);
}.bind(this));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"adm-zip" : "~0.4.3",
"ws": "0.4.31",
"socket.io" : "~0.9.16",
"MD5" : "~1.1.0",
"md5calculator" : "~0.0.3",
"through": "~2.3.4",
"date-utils": "~1.2.14",
"bytes": "~0.2.1"
Expand Down

0 comments on commit 005f9ac

Please sign in to comment.