write via temp file

This commit is contained in:
Joey Hess 2013-10-14 16:15:38 -04:00
parent 3989ad91e6
commit 92d5452a19

View file

@ -27,6 +27,7 @@ import Types.ScheduledActivity
import qualified Annex.Branch
import Logs
import Logs.UUIDBased
import Utility.Tmp
scheduleSet :: UUID -> [ScheduledActivity] -> Annex ()
scheduleSet uuid@(UUID _) activities = do
@ -67,5 +68,5 @@ getLastRunTimes = do
setLastRunTime :: ScheduledActivity -> LocalTime -> Annex ()
setLastRunTime activity lastrun = do
f <- fromRepo gitAnnexScheduleState
liftIO . writeFile f . show . M.insert activity lastrun
liftIO . viaTmp writeFile f . show . M.insert activity lastrun
=<< getLastRunTimes