diff options
Diffstat (limited to 'Command/Fsck.hs')
-rw-r--r-- | Command/Fsck.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 5561f9160..5a11ce192 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -90,6 +90,7 @@ seek :: FsckOptions -> CommandSeek seek o = allowConcurrentOutput $ do from <- maybe (pure Nothing) (Just <$$> getParsed) (fsckFromOption o) u <- maybe getUUID (pure . Remote.uuid) from + checkDeadRepo u i <- prepIncremental u (incrementalOpt o) withKeyOptions (keyOptions o) False (\k -> startKey i k =<< getNumCopies) @@ -98,6 +99,11 @@ seek o = allowConcurrentOutput $ do cleanupIncremental i void $ tryIO $ recordActivity Fsck u +checkDeadRepo :: UUID -> Annex () +checkDeadRepo u = + whenM ((==) DeadTrusted <$> lookupTrust u) $ + earlyWarning "Warning: Fscking a repository that is currently marked as dead." + start :: Maybe Remote -> Incremental -> FilePath -> Key -> CommandStart start from inc file key = do v <- Backend.getBackend file key |