Better error message when config file has wrong header
This commit is contained in:
parent
43443d4f27
commit
029fb73218
@ -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;
|
||||
|
@ -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?");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user