Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'p2/org.eclipse.cdt.p2')
-rw-r--r--p2/org.eclipse.cdt.p2/plugin.xml4
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java9
2 files changed, 8 insertions, 5 deletions
diff --git a/p2/org.eclipse.cdt.p2/plugin.xml b/p2/org.eclipse.cdt.p2/plugin.xml
index 6ac0bc1c8c0..9c25e5449bf 100644
--- a/p2/org.eclipse.cdt.p2/plugin.xml
+++ b/p2/org.eclipse.cdt.p2/plugin.xml
@@ -5,7 +5,7 @@
point="org.eclipse.equinox.p2.engine.actions">
<action
class="org.eclipse.cdt.internal.p2.touchpoint.natives.actions.UntarAction"
- name="untar"
+ name="org.eclipse.equinox.p2.touchpoint.natives.untar"
touchpointType="org.eclipse.equinox.p2.native"
touchpointVersion="1.0.0"
version="1.0.0">
@@ -15,7 +15,7 @@
point="org.eclipse.equinox.p2.engine.actions">
<action
class="org.eclipse.cdt.internal.p2.touchpoint.natives.actions.CleanupUntarAction"
- name="cleanupuntar"
+ name="org.eclipse.equinox.p2.touchpoint.natives.cleanupuntar"
touchpointType="org.eclipse.equinox.p2.native"
touchpointVersion="1.0.0"
version="1.0.0">
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
index 4a8b5fa5884..546b3f47c51 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
@@ -112,10 +112,12 @@ public class UntarAction extends ProvisioningAction {
private static File[] untar(String source, String destination, Compression compression) {
File zipFile = new File(source);
- if (zipFile == null || !zipFile.exists()) {
+ if (!zipFile.exists()) {
Util.log(UnzipAction.class.getName() + " the files to be unzipped is not here"); //$NON-NLS-1$
}
+ File target = new File(destination);
+
try {
FileInputStream fileIn = new FileInputStream(zipFile);
InputStream compIn = fileIn;
@@ -130,7 +132,7 @@ public class UntarAction extends ProvisioningAction {
ArrayList<File> fileList = new ArrayList<File>();
TarInputStream tarIn = new TarInputStream(compIn);
for (TarEntry tarEntry = tarIn.getNextEntry(); tarEntry != null; tarEntry = tarIn.getNextEntry()) {
- File outFile = new File(source, tarEntry.getName());
+ File outFile = new File(target, tarEntry.getName());
if (tarEntry.isDirectory()) {
outFile.mkdirs();
} else {
@@ -149,7 +151,8 @@ public class UntarAction extends ProvisioningAction {
tarIn.close();
return fileList.toArray(new File[fileList.size()]);
} catch (IOException e) {
- Util.log(UnzipAction.class.getName() + " error unzipping zipfile: " + zipFile.getAbsolutePath() + "destination: " + destination); //$NON-NLS-1$ //$NON-NLS-2$
+ Util.log(UnzipAction.class.getName() + " error unzipping zipfile: " + zipFile.getAbsolutePath() + " destination: " + destination); //$NON-NLS-1$ //$NON-NLS-2$
+ Util.log(e.getLocalizedMessage());
}
return null;
}

Back to the top