From e90f68e11df1c6b72d34d1835f64b6b912156936 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 15 Feb 2013 14:17:31 -0400 Subject: don't allow setting indirect mode on a crippled filesystem --- Command/Indirect.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Command') diff --git a/Command/Indirect.hs b/Command/Indirect.hs index e09e3c9be..90e0b6eaf 100644 --- a/Command/Indirect.hs +++ b/Command/Indirect.hs @@ -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 -- cgit v1.2.3