Permalink
Browse files

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

Needed by 3576 - jshint.vim
  • Loading branch information...
1 parent 9d2306d commit 203b1c40164eb62d9e6bb278fc9f864a25f6bd3e @bronson bronson committed Jun 3, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 scraper
View
@@ -1058,6 +1058,9 @@ def sense_file repo, actual_name, pkgfile
# names and magic have failed us, copy these files over raw
copy_file(repo, actual_name, File.read(pkgfile))
actual_name = nil
+ elsif magic_type == 'application/x-tar' && extension_type.include?('application/x-gtar')
+ # extension claims tarfile was gzipped but magic claims it wasn't. Trust the magic.
+ actual_name += '.tar'
elsif magic_type == 'application/zip' && extension_type.include?('application/x-java-archive')
# jarfiles sense as zipfiles so don't let the fixup code below "correct" the package extension
elsif magic_type == 'application/zip'

0 comments on commit 203b1c4

Please sign in to comment.