Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2008-12-19 20:32:33 +0000
committerDoug Schaefer2008-12-19 20:32:33 +0000
commitd735f36b31775490d9e1c744e019a814197a8672 (patch)
tree82da73a320b4daaa241337f388edb44316be3464 /p2/org.eclipse.cdt.p2
parente3a1eeca7a07a737cdf647c972234c038283052a (diff)
downloadorg.eclipse.cdt-d735f36b31775490d9e1c744e019a814197a8672.tar.gz
org.eclipse.cdt-d735f36b31775490d9e1c744e019a814197a8672.tar.xz
org.eclipse.cdt-d735f36b31775490d9e1c744e019a814197a8672.zip
Some fixes for zip compression.
Diffstat (limited to 'p2/org.eclipse.cdt.p2')
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java2
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java2
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java2
3 files changed, 4 insertions, 2 deletions
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java
index 9c105aa88d2..9202a2299e1 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallArtifactRepository.java
@@ -54,7 +54,7 @@ public class InstallArtifactRepository extends AbstractArtifactRepository {
public static final String FILENAME = "installArtifact.xml"; //$NON-NLS-1$
public static final String COMPRESSION = "compression";
- public static final String GZIP_COMPRESSON = "tar.gz";
+ public static final String GZIP_COMPRESSION = "tar.gz";
public static final String BZIP2_COMPRESSION = "tar.bz2";
public static final String ZIP_COMPRESSION = "zip";
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java
index be70385deb3..43b3fb0ca30 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/TarExtractor.java
@@ -43,7 +43,7 @@ public class TarExtractor extends Thread {
public void run() {
try {
InputStream compIn;
- if (InstallArtifactRepository.GZIP_COMPRESSON.equals(compression))
+ if (InstallArtifactRepository.GZIP_COMPRESSION.equals(compression))
compIn = new GZIPInputStream(in);
else if (InstallArtifactRepository.BZIP2_COMPRESSION.equals(compression)) {
// Skip the magic bytes first
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java
index ef7d0463437..793c2325c45 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/ZipExtractor.java
@@ -41,6 +41,8 @@ public class ZipExtractor extends Thread {
}
zipIn.closeEntry();
}
+ // Keep reading until there's none left
+ while (in.read() != -1);
zipIn.close();
fileListWriter.close();
} catch (IOException e) {

Back to the top