diff --git a/lib/html2doc/base.rb b/lib/html2doc/base.rb
index 671cf12..462541f 100644
--- a/lib/html2doc/base.rb
+++ b/lib/html2doc/base.rb
@@ -4,6 +4,7 @@
require "nokogiri"
require "xml/xslt"
require "pp"
+require "fileutils"
module Html2Doc
def self.process(result, hash)
@@ -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)