Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2008-04-24 18:27:41 -0400
committerAndrew Niefer2008-04-24 18:27:41 -0400
commita91e062fc820103938f67237b3d8701cfec40a19 (patch)
tree17f49f5425c4f127645a7326cd28bbe6837649bf /bundles
parentf4a8973768a5d932aed1ba1fcada9483c59f8fd9 (diff)
downloadrt.equinox.p2-a91e062fc820103938f67237b3d8701cfec40a19.tar.gz
rt.equinox.p2-a91e062fc820103938f67237b3d8701cfec40a19.tar.xz
rt.equinox.p2-a91e062fc820103938f67237b3d8701cfec40a19.zip
bug 228766 - NPEs from bundle shapev200804241828
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
index ce62b91b8..64a2e19e4 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
@@ -358,10 +358,11 @@ public class Generator {
IArtifactKey key = MetadataGeneratorHelper.createBundleArtifactKey(bd.getSymbolicName(), bd.getVersion().toString());
IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor(key, new File(bd.getLocation()), true, false);
- if (isDir)
- publishArtifact(ad, new File(bd.getLocation()).listFiles(), destination, false);
+ File bundleFile = new File(bd.getLocation());
+ if (bundleFile.isDirectory())
+ publishArtifact(ad, bundleFile.listFiles(), destination, false);
else
- publishArtifact(ad, new File[] {new File(bd.getLocation())}, destination, true);
+ publishArtifact(ad, new File[] {bundleFile}, destination, true);
if (info.reuseExistingPack200Files() && !info.publishArtifacts()) {
File packFile = new Path(bd.getLocation()).addFileExtension("pack.gz").toFile(); //$NON-NLS-1$
if (packFile.exists()) {

Back to the top