2013-08-04 20:33:18 +00:00
|
|
|
class Bzip2Uploader < BaseUploader
|
|
|
|
|
2013-08-13 17:46:43 +00:00
|
|
|
def decompressed_path
|
2013-08-04 20:33:18 +00:00
|
|
|
return unless file
|
2013-08-13 18:13:09 +00:00
|
|
|
|
|
|
|
cache_stored_file! unless cached?
|
|
|
|
|
|
|
|
out_path = "#{current_path}.decompressed"
|
2013-08-04 20:33:18 +00:00
|
|
|
|
2013-08-13 17:46:43 +00:00
|
|
|
unless File.exist?(out_path)
|
2013-08-13 18:13:09 +00:00
|
|
|
system("bzip2 -d -k -c #{current_path} >#{out_path}")
|
2013-08-04 20:33:18 +00:00
|
|
|
end
|
|
|
|
|
2013-08-13 17:46:43 +00:00
|
|
|
out_path
|
2013-08-04 20:33:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|