unlock: Fix behavior when file content is not present.
This commit is contained in:
parent
23686cc63d
commit
c1839fdccb
3 changed files with 16 additions and 4 deletions
|
@ -12,6 +12,7 @@ import System.Directory hiding (copyFile)
|
|||
|
||||
import Command
|
||||
import qualified Annex
|
||||
import qualified Backend
|
||||
import Types
|
||||
import Messages
|
||||
import Locations
|
||||
|
@ -31,8 +32,12 @@ seek = [withFilesInGit start]
|
|||
- content. -}
|
||||
start :: CommandStartString
|
||||
start file = isAnnexed file $ \(key, _) -> do
|
||||
showStart "unlock" file
|
||||
return $ Just $ perform file key
|
||||
inbackend <- Backend.hasKey key
|
||||
if not inbackend
|
||||
then return Nothing
|
||||
else do
|
||||
showStart "unlock" file
|
||||
return $ Just $ perform file key
|
||||
|
||||
perform :: FilePath -> Key -> CommandPerform
|
||||
perform dest key = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue