Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #11553 from adobe/fix/11552
Browse files Browse the repository at this point in the history
fixes #11552
  • Loading branch information
abose committed Sep 11, 2015
2 parents a233bb3 + 6afab58 commit 96023c4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/extensibility/node/ExtensionManagerDomain.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,10 @@ function legacyPackageCheck(legacyDirectory) {
* @param {{disabledDirectory: !string, apiVersion: !string, nameHint: ?string,
* systemExtensionDirectory: !string}} additional settings to control the installation
* @param {function} callback (err, result)
* @param {function} pCallback (msg) callback for notifications about operation progress
* @param {boolean} _doUpdate private argument to signal that an update should be performed
*/
function _cmdInstall(packagePath, destinationDirectory, options, callback, _doUpdate) {
function _cmdInstall(packagePath, destinationDirectory, options, callback, pCallback, _doUpdate) {
if (!options || !options.disabledDirectory || !options.apiVersion || !options.systemExtensionDirectory) {
callback(new Error(Errors.MISSING_REQUIRED_OPTIONS), null);
return;
Expand Down Expand Up @@ -272,7 +273,7 @@ function _cmdInstall(packagePath, destinationDirectory, options, callback, _doUp
// If the extension is already there, we signal to the front end that it's already installed
// unless the front end has signaled an intent to update.
if (hasLegacyPackage || fs.existsSync(installDirectory) || fs.existsSync(systemInstallDirectory)) {
if (_doUpdate) {
if (_doUpdate === true) {
if (hasLegacyPackage) {
// When there's a legacy installed extension, remove it first,
// then also remove any new-style directory the user may have.
Expand Down Expand Up @@ -333,9 +334,10 @@ function _cmdInstall(packagePath, destinationDirectory, options, callback, _doUp
* @param {{disabledDirectory: !string, apiVersion: !string, nameHint: ?string,
* systemExtensionDirectory: !string}} additional settings to control the installation
* @param {function} callback (err, result)
* @param {function} pCallback (msg) callback for notifications about operation progress
*/
function _cmdUpdate(packagePath, destinationDirectory, options, callback) {
_cmdInstall(packagePath, destinationDirectory, options, callback, true);
function _cmdUpdate(packagePath, destinationDirectory, options, callback, pCallback) {
_cmdInstall(packagePath, destinationDirectory, options, callback, pCallback, true);
}

/**
Expand Down Expand Up @@ -375,7 +377,7 @@ function _endDownload(downloadId, error) {
/**
* Implements "downloadFile" command, asynchronously.
*/
function _cmdDownloadFile(downloadId, url, proxy, callback) {
function _cmdDownloadFile(downloadId, url, proxy, callback, pCallback) {
// Backwards compatibility check, added in 0.37
if (typeof proxy === "function") {
callback = proxy;
Expand Down Expand Up @@ -436,7 +438,7 @@ function _cmdAbortDownload(downloadId) {
/**
* Implements the remove extension command.
*/
function _cmdRemove(extensionDir, callback) {
function _cmdRemove(extensionDir, callback, pCallback) {
fs.remove(extensionDir, function (err) {
if (err) {
callback(err);
Expand Down

0 comments on commit 96023c4

Please sign in to comment.