Skip to content

Commit

Permalink
Merge pull request #373 from dpogue/resouce-file-overwrite
Browse files Browse the repository at this point in the history
CB-14141: Don't duplicate resource files in xcodeproj
  • Loading branch information
janpio authored Sep 2, 2018
2 parents 9d2ea13 + e2c885f commit ad96ef0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/templates/scripts/cordova/lib/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,11 @@ function updateFileResources (cordovaProject, locations) {
let targetPath = path.join(project.resources_dir, target);
targetPath = path.relative(cordovaProject.root, targetPath);

project.xcode.addResourceFile(target);
if (!fs.existsSync(targetPath)) {
project.xcode.addResourceFile(target);
} else {
events.emit('warn', 'Overwriting existing resource file at ' + targetPath);
}

resourceMap[targetPath] = src;
});
Expand Down

0 comments on commit ad96ef0

Please sign in to comment.