diff options
author | sin <sin@2f30.org> | 2014-09-22 12:26:02 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-22 12:26:02 +0100 |
commit | a8f37cdeb4ac560d6a6c5e647557268b0f84ac52 (patch) | |
tree | eafb57f5777d6b50c6b813ff1754958bb34fde21 /ratox.c | |
parent | 1a43beddb893b9198103a42aac3e8773f1af3cef (diff) |
Allow a client with encrypted support to load non-encrypt datafiles
Diffstat (limited to 'ratox.c')
-rw-r--r-- | ratox.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -605,10 +605,15 @@ dataload(void) exit(EXIT_FAILURE); } - if (tox_is_data_encrypted(data) ^ encryptsave) { - fprintf(stderr, "Ensure %s matches your encryption configuration\n", - DATAFILE); - exit(EXIT_FAILURE); + if (encryptsave == 1) { + if (tox_is_data_encrypted(data) == 0) + encryptsave = 0; + } else { + if (tox_is_data_encrypted(data) == 1) { + fprintf(stderr, "Unable to load %s, it is encrypted\n", + DATAFILE); + exit(EXIT_FAILURE); + } } if (encryptsave == 1) { |