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
|
@ -84,7 +84,7 @@ genAddress = starting "gen-address" (ActionItemOther Nothing) (SeekInput []) $ d
|
|||
KeyContainer s -> liftIO $ genkey (Param s)
|
||||
KeyFile f -> do
|
||||
createAnnexDirectory (takeDirectory f)
|
||||
liftIO $ nukeFile f
|
||||
liftIO $ removeWhenExistsWith removeLink f
|
||||
liftIO $ protectedOutput $ genkey (File f)
|
||||
case (ok, parseFingerprint s) of
|
||||
(False, _) -> giveup $ "uftp_keymgt failed: " ++ s
|
||||
|
@ -210,7 +210,7 @@ storeReceived f = do
|
|||
case deserializeKey (takeFileName f) of
|
||||
Nothing -> do
|
||||
warning $ "Received a file " ++ f ++ " that is not a git-annex key. Deleting this file."
|
||||
liftIO $ nukeFile f
|
||||
liftIO $ removeWhenExistsWith removeLink f
|
||||
Just k -> void $
|
||||
getViaTmpFromDisk RetrievalVerifiableKeysSecure AlwaysVerify k $ \dest -> unVerified $
|
||||
liftIO $ catchBoolIO $ do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue