Skip to content
This repository
Browse code

Fix extension claiming tarfile was gzipped but it wasn't.

Needed by 3576 - jshint.vim
  • Loading branch information...
commit 203b1c40164eb62d9e6bb278fc9f864a25f6bd3e 1 parent 9d2306d
Scott Bronson authored June 02, 2011

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  scraper
3  scraper
@@ -1058,6 +1058,9 @@ def sense_file repo, actual_name, pkgfile
1058 1058
             # names and magic have failed us, copy these files over raw
1059 1059
             copy_file(repo, actual_name, File.read(pkgfile))
1060 1060
             actual_name = nil
  1061
+        elsif magic_type == 'application/x-tar' && extension_type.include?('application/x-gtar')
  1062
+            # extension claims tarfile was gzipped but magic claims it wasn't.  Trust the magic.
  1063
+            actual_name += '.tar'
1061 1064
         elsif magic_type == 'application/zip' && extension_type.include?('application/x-java-archive')
1062 1065
             # jarfiles sense as zipfiles so don't let the fixup code below "correct" the package extension
1063 1066
         elsif magic_type == 'application/zip'

0 notes on commit 203b1c4

Please sign in to comment.
Something went wrong with that request. Please try again.