aboutsummaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Fsck.hs12
-rw-r--r--Command/FuzzTest.hs2
-rw-r--r--Command/ImportFeed.hs5
3 files changed, 9 insertions, 10 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 7884f0477..2db6e279d 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -563,15 +563,15 @@ recordStartTime :: UUID -> Annex ()
recordStartTime u = do
f <- fromRepo (gitAnnexFsckState u)
createAnnexDirectory $ parentDir f
- liftIO $ do
- nukeFile f
- withFile f WriteMode $ \h -> do
+ liftIO $ nukeFile f
+ liftIO $ withFile f WriteMode $ \h -> do
#ifndef mingw32_HOST_OS
- t <- modificationTime <$> getFileStatus f
+ t <- modificationTime <$> getFileStatus f
#else
- t <- getPOSIXTime
+ t <- getPOSIXTime
#endif
- hPutStr h $ showTime $ realToFrac t
+ hPutStr h $ showTime $ realToFrac t
+ setAnnexFilePerm f
where
showTime :: POSIXTime -> String
showTime = show
diff --git a/Command/FuzzTest.hs b/Command/FuzzTest.hs
index 0c5aac9b3..fd650facf 100644
--- a/Command/FuzzTest.hs
+++ b/Command/FuzzTest.hs
@@ -33,7 +33,7 @@ start = do
guardTest
logf <- fromRepo gitAnnexFuzzTestLogFile
showStart "fuzztest" logf
- logh <-liftIO $ openFile logf WriteMode
+ logh <- liftIO $ openFile logf WriteMode
void $ forever $ fuzz logh
stop
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs
index a02d11824..1dee48454 100644
--- a/Command/ImportFeed.hs
+++ b/Command/ImportFeed.hs
@@ -30,10 +30,10 @@ import qualified Remote
import qualified Types.Remote as Remote
import Types.UrlContents
import Logs.Web
+import Logs.File
import qualified Utility.Format
import Utility.Tmp
import Command.AddUrl (addUrlFile, downloadRemoteFile, parseDownloadOptions, DownloadOptions(..))
-import Annex.Perms
import Annex.UUID
import Backend.URL (fromUrl)
import Annex.Content
@@ -386,8 +386,7 @@ checkFeedBroken' url f = do
now <- liftIO getCurrentTime
case prev of
Nothing -> do
- createAnnexDirectory (parentDir f)
- liftIO $ writeFile f $ show now
+ writeLogFile f $ show now
return False
Just prevtime -> do
let broken = diffUTCTime now prevtime > 60 * 60 * 23