From 1e2af798518ceb5a87913bc46d0a99f0687846e9 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Sun, 21 Nov 2010 03:00:43 +0000 Subject: [PATCH] Let's handle .tar files as well rather than requiring .tar.gz. git-svn-id: http://google-refine.googlecode.com/svn/trunk@1919 7d457c2a-affb-35e4-300a-418c747d4874 --- .../google/refine/commands/project/CreateProjectCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/src/com/google/refine/commands/project/CreateProjectCommand.java b/main/src/com/google/refine/commands/project/CreateProjectCommand.java index ca8122a61..79e62c53f 100644 --- a/main/src/com/google/refine/commands/project/CreateProjectCommand.java +++ b/main/src/com/google/refine/commands/project/CreateProjectCommand.java @@ -209,7 +209,7 @@ public class CreateProjectCommand extends Command { logger.info("Importing '{}'", fileName); - if (fileName.endsWith(".zip") || fileName.endsWith(".tar.gz") || fileName.endsWith(".tgz") || fileName.endsWith(".tar.bz2")) { + if (fileName.endsWith(".zip") || fileName.endsWith(".tar") || fileName.endsWith(".tar.gz") || fileName.endsWith(".tgz") || fileName.endsWith(".tar.bz2")) { // first, save the file on disk, since we need two passes and we might // not have enough memory to keep it all in there @@ -363,6 +363,8 @@ public class CreateProjectCommand extends Command { return new TarInputStream(new GZIPInputStream(is)); } else if (fileName.endsWith(".tar.bz2")) { return new TarInputStream(new CBZip2InputStream(is)); + } else if (fileName.endsWith(".tar")) { + return new TarInputStream(is); } else { return new ZipInputStream(is); }