From 029fb7321874876aa2a0afcfc9e35fb7e63a10b4 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Tue, 9 Feb 2016 09:14:02 +0100 Subject: [PATCH] Better error message when config file has wrong header --- src/config/CryConfigLoader.cpp | 1 - src/config/crypto/inner/InnerConfig.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/config/CryConfigLoader.cpp b/src/config/CryConfigLoader.cpp index 814fc5fb..9797d4e9 100644 --- a/src/config/CryConfigLoader.cpp +++ b/src/config/CryConfigLoader.cpp @@ -34,7 +34,6 @@ optional CryConfigLoader::_loadConfig(const bf::path &filename) { std::cout << "Loading config file..." << std::flush; auto config = CryConfigFile::load(filename, password); if (config == none) { - LOG(ERROR) << "Could not load config file. Wrong password?"; return none; } std::cout << "done" << std::endl; diff --git a/src/config/crypto/inner/InnerConfig.cpp b/src/config/crypto/inner/InnerConfig.cpp index a529b359..38cb4ee3 100644 --- a/src/config/crypto/inner/InnerConfig.cpp +++ b/src/config/crypto/inner/InnerConfig.cpp @@ -45,7 +45,7 @@ namespace cryfs { void InnerConfig::_checkHeader(Deserializer *deserializer) { string header = deserializer->readString(); if (header != HEADER) { - throw std::runtime_error("Invalid header"); + throw std::runtime_error("Invalid header. Maybe this filesystem was created with a different version of CryFS?"); } }