lib/isodoc/function/to_word_html.rb in isodoc-0.9.2 vs lib/isodoc/function/to_word_html.rb in isodoc-0.9.3
- old
+ new
@@ -1,5 +1,7 @@
+require "fileutils"
+
module IsoDoc::Function
module ToWordHtml
def set_termdomain(termdomain)
@termdomain = termdomain
@@ -16,10 +18,10 @@
def init_file(filename, debug)
filename = filename.gsub(%r{\.[^/.]+$}, "")
dir = "#{filename}_files"
unless debug
Dir.mkdir(dir) unless File.exists?(dir)
- system "rm -r #{dir}/*"
+ FileUtils.rm_rf "#{dir}/*"
end
@filename = filename
[filename, dir]
end