summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Bull2013-05-16 15:53:47 (EDT)
committerIan Bull2013-05-16 15:53:47 (EDT)
commit6632465a3e69d810e75a13e41a6000a3bcd41234 (patch)
tree40384b5fe449757d87f414b394bb25ff0dad3911
parentdd84b0338b3479f5ee41b18823f10d8ddeb4f2e4 (diff)
downloadrt.equinox.p2-6632465a3e69d810e75a13e41a6000a3bcd41234.zip
rt.equinox.p2-6632465a3e69d810e75a13e41a6000a3bcd41234.tar.gz
rt.equinox.p2-6632465a3e69d810e75a13e41a6000a3bcd41234.tar.bz2
Bug 406942 - BrandingIron#modifyInfoPListFile(..) should not remove iconI20130516-2200I20130516-1800I20130516-1600
If the icon name is empty, we don't update the Info.plist file.
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
index b2abf79..3cf2fe1 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
@@ -540,11 +540,13 @@ public class BrandingIron {
replacePlistValue(buffer, BUNDLE_SHORT_VERSION_KEY, sv.toString());
}
- int iconPos = scan(buffer, 0, ICON_NAME);
- if (iconPos != -1)
- buffer.replace(iconPos, iconPos + ICON_NAME.length(), iconName);
- else {
- replacePlistValue(buffer, ICON_KEY, iconName);
+ if (iconName.length() > 0) {
+ int iconPos = scan(buffer, 0, ICON_NAME);
+ if (iconPos != -1) {
+ buffer.replace(iconPos, iconPos + ICON_NAME.length(), iconName);
+ } else {
+ replacePlistValue(buffer, ICON_KEY, iconName);
+ }
}
File target = new File(targetRoot, "Info.plist"); //$NON-NLS-1$;