Method: Milkode::Cdstk#convert_content

Defined in:
lib/milkode/cdstk/cdstk.rb

#convert_content(src, options) ⇒ Object



228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/milkode/cdstk/cdstk.rb', line 228

def convert_content(src, options)
  # httpファイルならダウンロード
  begin
    src = download_file(src, options)
  rescue AddError => e
    raise e
  rescue => e
    error_alert("download failure '#{src}'.")
    raise e                 # そのまま上に持ち上げてスタックトレース表示
  end
  
  # アーカイブファイルなら展開
  begin
    src = extract_file(src)
  rescue => e
    error_alert("extract failure '#{src}'.")
    raise e                 # そのまま上に持ち上げてスタックトレース表示
  end

  # 絶対パスに変換
  File.expand_path(src)
end