diff options
Diffstat (limited to 'Command/DropKey.hs')
-rw-r--r-- | Command/DropKey.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Command/DropKey.hs b/Command/DropKey.hs index 34010481d..aa72e1bbd 100644 --- a/Command/DropKey.hs +++ b/Command/DropKey.hs @@ -22,12 +22,12 @@ seek = [withKeys start] start :: SubCmdStartString start keyname = do backends <- Backend.list - let key = genKey (backends !! 0) keyname + let key = genKey (head backends) keyname present <- inAnnex key force <- Annex.flagIsSet "force" - if (not present) + if not present then return Nothing - else if (not force) + else if not force then error "dropkey is can cause data loss; use --force if you're sure you want to do this" else do showStart "dropkey" keyname |