src/hg/encode/encodeValidate/doEncodeValidate.pl 1.164

1.164 2009/03/07 23:04:19 mikep
open tars
Index: src/hg/encode/encodeValidate/doEncodeValidate.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeValidate/doEncodeValidate.pl,v
retrieving revision 1.163
retrieving revision 1.164
diff -b -B -U 4 -r1.163 -r1.164
--- src/hg/encode/encodeValidate/doEncodeValidate.pl	6 Mar 2009 20:47:31 -0000	1.163
+++ src/hg/encode/encodeValidate/doEncodeValidate.pl	7 Mar 2009 23:04:19 -0000	1.164
@@ -350,15 +350,16 @@
     );
 
 sub openUtil
 {
-# Handles opening gzipped, tar gzipped, as well as plain files
+# Handles opening gzipped, tar gzipped, tar, as well as plain files
     my ($path, $file) = @_;
     my $fh = new IO::File;
     my $filePath = defined($path) ? "$path/$file" : $file;
-    open($fh, Encode::isTarZipped($filePath) ? "/bin/tar -Ozxf $filePath |"
+    open($fh, Encode::isTar($filePath) ? "/bin/tar -Oxf $filePath |"
+	      : ( Encode::isTarZipped($filePath) ? "/bin/tar -Ozxf $filePath |"
 	      : ( Encode::isZipped($filePath) ? "/bin/gunzip -c $filePath |"
-		  : $filePath )
+		      : $filePath ))
 	) or die "Couldn't open file '$file'; error: $!\n";
     return $fh;
 }