From 177245deb6ee3271eb44d77c2b0cd722755b2c3f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 14 Feb 2013 14:10:36 -0400 Subject: crippled filesystem support, probing and initial support git annex init probes for crippled filesystems, and sets direct mode, as well as `annex.crippledfilesystem`. Avoid manipulating permissions of files on crippled filesystems. That would likely cause an exception to be thrown. Very basic support in Command.Add for cripped filesystems; avoids the lock down entirely since doing it needs both permissions and hard links. Will make this better soon. --- Config.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs index ad67a9a0d..d37989e66 100644 --- a/Config.hs +++ b/Config.hs @@ -86,6 +86,14 @@ setDirect b = do setConfig (annexConfig "direct") (Git.Config.boolConfig b) Annex.changeGitConfig $ \c -> c { annexDirect = b } +crippledFileSystem :: Annex Bool +crippledFileSystem = annexCrippledFileSystem <$> Annex.getGitConfig + +setCrippledFileSystem :: Bool -> Annex () +setCrippledFileSystem b = do + setConfig (annexConfig "crippledfilesystem") (Git.Config.boolConfig b) + Annex.changeGitConfig $ \c -> c { annexCrippledFileSystem = b } + {- Gets the http headers to use. -} getHttpHeaders :: Annex [String] getHttpHeaders = do -- cgit v1.2.3