Skip to content

Commit

Permalink
Fix comments in getInstallDestination
Browse files Browse the repository at this point in the history
(in pluginHandlers.js)
  • Loading branch information
Christopher J. Brody committed Nov 14, 2018
1 parent 21f8473 commit 895ab0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/templates/cordova/lib/pluginHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,14 @@ function getInstallDestination (obj) {
var APP_MAIN_PREFIX = 'app/src/main';

if (obj.targetDir.includes('app')) {
// If any source file is using the app new directory structure,
// If any source file is using the new app directory structure,
// don't penalize it
return path.join(obj.targetDir, path.basename(obj.src));
} else if (obj.src.endsWith('.java')) {
return path.join(APP_MAIN_PREFIX, 'java', obj.targetDir.substring(4), path.basename(obj.src));
} else {
// For all other files, add 'app/src/main' to the targetDir if it didn't have it already
// For all other source files not using the new app directory structure,
// add 'app/src/main' to the targetDir
return path.join(APP_MAIN_PREFIX, obj.targetDir, path.basename(obj.src));
}

Expand Down

0 comments on commit 895ab0c

Please sign in to comment.