initremote: Prevent enabling encryption with exporttree=yes/importtree=yes
I do think this was a reversion, but I have not tracked back to what version. While involving the remote config, it's not the same class of problems that I kept having to chase down for a while after the remote config parser reworking.
This commit is contained in:
parent
74c1e0660b
commit
6c890d62f6
4 changed files with 14 additions and 2 deletions
|
@ -14,7 +14,7 @@ import Types.Remote
|
|||
import Types.Key
|
||||
import Types.ProposedAccepted
|
||||
import Backend
|
||||
import Remote.Helper.Encryptable (isEncrypted)
|
||||
import Remote.Helper.Encryptable (encryptionIsEnabled)
|
||||
import qualified Database.Export as Export
|
||||
import qualified Database.ContentIdentifier as ContentIdentifier
|
||||
import Annex.Export
|
||||
|
@ -83,7 +83,7 @@ adjustExportImportRemoteType rt = rt { setup = setup' }
|
|||
ifM (supported rt pc gc)
|
||||
( case st of
|
||||
Init
|
||||
| configured pc && isEncrypted pc ->
|
||||
| configured pc && encryptionIsEnabled pc ->
|
||||
giveup $ "cannot enable both encryption and " ++ fromProposedAccepted configfield
|
||||
| otherwise -> cont
|
||||
Enable oldc -> do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue