Better error message when config file has wrong header

This commit is contained in:
Sebastian Messmer 2016-02-09 09:14:02 +01:00
parent 43443d4f27
commit 029fb73218
2 changed files with 1 additions and 2 deletions

View File

@ -34,7 +34,6 @@ optional<CryConfigFile> 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;

View File

@ -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?");
}
}