more RawFilePath conversion
nukeFile replaced with removeWhenExistsWith removeLink, which allows using RawFilePath. Utility.Directory cannot use RawFilePath since setup does not depend on posix. This commit was sponsored by Graham Spencer on Patreon.
This commit is contained in:
parent
8d66f7ba0f
commit
e505c03bcc
51 changed files with 182 additions and 153 deletions
|
@ -584,7 +584,7 @@ recordStartTime :: UUID -> Annex ()
|
|||
recordStartTime u = do
|
||||
f <- fromRepo (gitAnnexFsckState u)
|
||||
createAnnexDirectory $ parentDir f
|
||||
liftIO $ nukeFile f
|
||||
liftIO $ removeWhenExistsWith removeLink f
|
||||
liftIO $ withFile f WriteMode $ \h -> do
|
||||
#ifndef mingw32_HOST_OS
|
||||
t <- modificationTime <$> getFileStatus f
|
||||
|
@ -598,7 +598,8 @@ recordStartTime u = do
|
|||
showTime = show
|
||||
|
||||
resetStartTime :: UUID -> Annex ()
|
||||
resetStartTime u = liftIO . nukeFile =<< fromRepo (gitAnnexFsckState u)
|
||||
resetStartTime u = liftIO . removeWhenExistsWith removeLink
|
||||
=<< fromRepo (gitAnnexFsckState u)
|
||||
|
||||
{- Gets the incremental fsck start time. -}
|
||||
getStartTime :: UUID -> Annex (Maybe EpochTime)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue