From 92d5452a19ac4f2c50787c299e363aae0342f867 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Oct 2013 16:15:38 -0400 Subject: [PATCH] write via temp file --- Logs/Schedule.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Logs/Schedule.hs b/Logs/Schedule.hs index 56fb3399ef..1d78467bba 100644 --- a/Logs/Schedule.hs +++ b/Logs/Schedule.hs @@ -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