Fix crash when exporttree is set to a bad value.
Made it impossible to recover from setting a bad value since enableremote to change it would crash. This commit was sponsored by Henrik Riomar on Patreon.
This commit is contained in:
parent
def5d8b02c
commit
6f0d8870df
2 changed files with 4 additions and 1 deletions
|
@ -14,6 +14,7 @@ git-annex (6.20180927) UNRELEASED; urgency=medium
|
|||
when the same tree was exported by multiple clones.
|
||||
* Fix potential crash in exporttree database due to failure to honor
|
||||
uniqueness constraint.
|
||||
* Fix crash when exporttree is set to a bad value.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Thu, 27 Sep 2018 15:27:20 -0400
|
||||
|
||||
|
|
|
@ -75,7 +75,9 @@ adjustExportable r = case M.lookup "exporttree" (config r) of
|
|||
)
|
||||
Nothing -> notexport
|
||||
Just "no" -> notexport
|
||||
Just _ -> error "bad exporttree value"
|
||||
Just _ -> do
|
||||
warning $ "bad exporttree value for " ++ name r ++ ", assuming not an export"
|
||||
notexport
|
||||
where
|
||||
notexport = return $ r
|
||||
{ exportActions = exportUnsupported
|
||||
|
|
Loading…
Add table
Reference in a new issue