From: martinahansen Date: Mon, 7 Oct 2013 08:40:53 +0000 (+0000) Subject: fixed symlink flaw in file type detection X-Git-Url: https://git.donarmstrong.com/?p=biopieces.git;a=commitdiff_plain;h=d853435e09acb0ff7123b03c711eaf66073ee900 fixed symlink flaw in file type detection git-svn-id: http://biopieces.googlecode.com/svn/trunk@2224 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/lib/maasha/filesys.rb b/code_ruby/lib/maasha/filesys.rb index 4f58898..cee9e22 100644 --- a/code_ruby/lib/maasha/filesys.rb +++ b/code_ruby/lib/maasha/filesys.rb @@ -61,7 +61,7 @@ class Filesys if file == '-' ios = STDIN else - case `file #{file}` + case `file -L #{file}` when /gzip/ ios = Zlib::GzipReader.new File.open(file, mode, options) when /bzip/