[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mhc:02158] Re: palm2mhc should fsync before clear dirty flag.



  Message-Id: <20050714.201109.104033925.koie@xxxxxxxxxxxxxxxxx>
  Date:       Thu, 14 Jul 2005 20:11:09 +0900 (JST)
  From:       KOIE Hidetaka (鯉江英隆) <hide@xxxxxxxx>
  Subject:    [mhc:02147] Re: palm2mhc should fsync before clear dirty..

commitありがとうございました。
若干問題があるようなのでパッチを添付します。
#行番号はずれているので注意

Index: ruby-ext/lib/mhc-schedule.rb
===================================================================
RCS file: /cvsroot/mhc/ruby-ext/lib/mhc-schedule.rb,v
retrieving revision 1.22
diff -u -F^(def -F^[_a-zA-Z] -r1.22 mhc-schedule.rb
--- ruby-ext/lib/mhc-schedule.rb	8 Sep 2005 02:56:14 -0000	1.22
+++ ruby-ext/lib/mhc-schedule.rb	24 Sep 2005 04:13:21 -0000
@@ -1297,6 +1320,7 @@ class MhcScheduleDB
     return true if File .directory?(dir)
     parent = File .dirname(dir)
     if makedir_or_higher(parent)
+      Dir .mkdir(dir)
       File .open(dir, "r") .fsync .close if File .method_defined?("fsync")
       return true
     end
@@ -1437,7 +1461,7 @@ class MhcLog
   def add_entry(entry)
     file = File .open(@filename, "a+")
     file .print "#{entry}\n"
-    file .fsync if f .respond_to?("fsync")
+    file .fsync if file .respond_to?("fsync")
     file .close
   end
 

--
KOIE Hidetaka <hide@xxxxxxxx>