diff --git a/src/apps.js b/src/apps.js index eaca27421..1e9b9850e 100644 --- a/src/apps.js +++ b/src/apps.js @@ -355,7 +355,7 @@ function install(appId, data, auditSource, callback) { var appStoreId = data.appStoreId, manifest = data.manifest, - location = data.location, + location = data.location.toLowerCase(), portBindings = data.portBindings || null, accessRestriction = data.accessRestriction || null, icon = data.icon || null, @@ -418,8 +418,8 @@ function install(appId, data, auditSource, callback) { purchase(appStoreId, function (error) { if (error) return callback(error); - appdb.add(appId, appStoreId, manifest, location.toLowerCase(), portBindings, accessRestriction, memoryLimit, altDomain, function (error) { - if (error && error.reason === DatabaseError.ALREADY_EXISTS) return callback(getDuplicateErrorDetails(location.toLowerCase(), portBindings, error)); + appdb.add(appId, appStoreId, manifest, location, portBindings, accessRestriction, memoryLimit, altDomain, function (error) { + if (error && error.reason === DatabaseError.ALREADY_EXISTS) return callback(getDuplicateErrorDetails(location, portBindings, error)); if (error) return callback(new AppsError(AppsError.INTERNAL_ERROR, error)); // save cert to data/box/certs