don't allow setting indirect mode on a crippled filesystem
This commit is contained in:
parent
4da932a48f
commit
2e49a7e729
2 changed files with 21 additions and 9 deletions
|
@ -16,6 +16,7 @@ import Config
|
|||
import Annex.Direct
|
||||
import Annex.Content
|
||||
import Annex.CatFile
|
||||
import Init
|
||||
|
||||
def :: [Command]
|
||||
def = [notBareRepo $ command "indirect" paramNothing seek
|
||||
|
@ -25,7 +26,13 @@ seek :: [CommandSeek]
|
|||
seek = [withNothing start]
|
||||
|
||||
start :: CommandStart
|
||||
start = ifM isDirect ( next perform, stop )
|
||||
start = ifM isDirect
|
||||
( ifM probeCrippledFileSystem
|
||||
( error "This repository seems to be on a crippled filesystem, you must use direct mode."
|
||||
, next perform
|
||||
)
|
||||
, stop
|
||||
)
|
||||
|
||||
perform :: CommandPerform
|
||||
perform = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue