diff options
author | 2015-10-08 17:58:32 -0400 | |
---|---|---|
committer | 2015-10-08 17:58:32 -0400 | |
commit | a56d3c92b9672c6d84ac007a404b07d3eeb51025 (patch) | |
tree | 2264ea086ca39f7243deb1adfcb085551006b07d /Command/Drop.hs | |
parent | d5494842274030d21356c7492e6de5969173c34d (diff) |
support invalidating existing VerifiedCopys
Diffstat (limited to 'Command/Drop.hs')
-rw-r--r-- | Command/Drop.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs index 49e4bea85..26872c6c0 100644 --- a/Command/Drop.hs +++ b/Command/Drop.hs @@ -95,7 +95,7 @@ startRemote afile numcopies key remote = do performLocal :: Key -> AssociatedFile -> NumCopies -> [VerifiedCopy] -> CommandPerform performLocal key afile numcopies preverified = lockContentExclusive key $ \contentlock -> do (remotes, trusteduuids) <- Remote.keyPossibilitiesTrusted key - let preverified' = preverified ++ map TrustedCopy trusteduuids + let preverified' = preverified ++ map (mkVerifiedCopy TrustedCopy) trusteduuids untrusteduuids <- trustGet UnTrusted let tocheck = Remote.remotesWithoutUUID remotes (map toUUID preverified'++untrusteduuids) u <- getUUID @@ -117,10 +117,11 @@ performRemote key afile numcopies remote = do -- as long as the local repo is not untrusted. (remotes, trusteduuids) <- knownCopies key let trusted = filter (/= uuid) trusteduuids + let preverified = map (mkVerifiedCopy TrustedCopy) trusted untrusteduuids <- trustGet UnTrusted let tocheck = filter (/= remote) $ Remote.remotesWithoutUUID remotes (trusted++untrusteduuids) - stopUnless (canDrop uuid key afile numcopies [uuid] (map TrustedCopy trusted) tocheck) $ do + stopUnless (canDrop uuid key afile numcopies [uuid] preverified tocheck) $ do ok <- Remote.removeKey remote key next $ cleanupRemote key remote ok where |