unlock of not present file should still be a failure, just not a crash
This commit is contained in:
parent
6adbd50cd9
commit
c78a7aa1e1
1 changed files with 9 additions and 4 deletions
|
@ -26,12 +26,17 @@ seek = withFilesInGit $ whenAnnexed start
|
|||
{- The unlock subcommand replaces the symlink with a copy of the file's
|
||||
- content. -}
|
||||
start :: FilePath -> Key -> CommandStart
|
||||
start file key = stopUnless (inAnnex key) $ do
|
||||
start file key = do
|
||||
showStart "unlock" file
|
||||
ifM (checkDiskSpace Nothing key 0)
|
||||
( next $ perform file key
|
||||
ifM (inAnnex key)
|
||||
( ifM (checkDiskSpace Nothing key 0)
|
||||
( next $ perform file key
|
||||
, do
|
||||
warning "not enough disk space to copy file"
|
||||
next $ next $ return False
|
||||
)
|
||||
, do
|
||||
warning "not enough disk space to copy file"
|
||||
warning "content not present; cannot unlock"
|
||||
next $ next $ return False
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue