more fixes to windows build for content retention files

This commit is contained in:
Joey Hess 2024-07-29 13:58:40 -04:00
parent fcc052bed8
commit 647bff9770
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -174,11 +174,11 @@ lockContentShared key mduration a = do
Nothing -> return Nothing Nothing -> return Nothing
, \lckfile -> do , \lckfile -> do
maybe noop (\a -> a lckfile) postunlock maybe noop (\a -> a lckfile) postunlock
lockdropretention retention lockdropretention v retention
) )
lockdropretention Nothing = noop lockdropretention _ Nothing = noop
lockdropretention retention@(Just _) = do lockdropretention v retention@(Just _) = do
-- In order to dropretention, have to -- In order to dropretention, have to
-- take an exclusive lock. -- take an exclusive lock.
let (exlocker, expostunlock) = let (exlocker, expostunlock) =
@ -363,7 +363,7 @@ lockContentUsing contentlocker key fallback a = withContentLockFile key $ \mlock
Nothing -> noop -- never reached Nothing -> noop -- never reached
Just lockfile -> do Just lockfile -> do
maybe noop (\a -> a lockfile) postunlock maybe noop (\a -> a lockfile) postunlock
cleanuplockfile cleanuplockfile lockfile
#endif #endif
cleanuplockfile lockfile = void $ tryNonAsync $ do cleanuplockfile lockfile = void $ tryNonAsync $ do