[Hiki-cvs 1581] hiki/hiki @ 295e56b [master] use FileUtils instead of system method

Back to archive index

Shin-ya Murakami null****@okkez*****
2013年 11月 16日 (土) 14:43:35 JST


Shin-ya Murakami	2013-11-16 14:43:35 +0900 (Sat, 16 Nov 2013)

  New Revision: 295e56b1f15398cd76ee1ccf7e5f52967d9e7f1c
  https://github.com/hiki/hiki/commit/295e56b1f15398cd76ee1ccf7e5f52967d9e7f1c

  Merged d30fe47: Merge pull request #45 from murashin/master

  Message:
    use FileUtils instead of system method

  Modified files:
    tool/convert.rb

  Modified: tool/convert.rb (+1 -1)
===================================================================
--- tool/convert.rb    2013-11-08 17:33:59 +0900 (afd14b4)
+++ tool/convert.rb    2013-11-16 14:43:35 +0900 (2738b93)
@@ -45,7 +45,7 @@ def convert(data_path, database_class, input_encoding, output_encoding, nkf)
       attach_path = data_path + "cache/attach/"
       if Dir.exist? attach_path + Hiki::Util.escape(old_page)
         if Hiki::Util.escape(old_page) != Hiki::Util.escape(new_page)
-          system "mv #{attach_path}/#{Hiki::Util.escape(old_page)} #{attach_path}/#{Hiki::Util.escape(new_page)}"
+          FileUtils.mv("#{attach_path}/#{Hiki::Util.escape(old_page)}", "#{attach_path}/#{Hiki::Util.escape(new_page)}")
         end
       end
       old_text = db.load(old_page)




Hiki-cvs メーリングリストの案内
Back to archive index