Skip to content

Commit

Permalink
FileUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Sep 23, 2018
1 parent 0ad456c commit b0d9624
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/html2doc/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require "nokogiri"
require "xml/xslt"
require "pp"
require "fileutils"

module Html2Doc
def self.process(result, hash)
Expand Down Expand Up @@ -37,9 +38,9 @@ def self.process_html(result, hash)
end

def self.rm_temp_files(filename, dir, dir1)
system "rm #{filename}.htm"
system "rm -r #{dir1}/header.html"
system "rm -r #{dir1}" unless dir
FileUtils.rm "#{filename}.htm"
FileUtils.rm_f "#{dir1}/header.html"
FileUtils.rm_r dir1 unless dir
end

def self.cleanup(docxml, hash)
Expand Down

0 comments on commit b0d9624

Please sign in to comment.