Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,10 @@ static void load_key (Key_file& key_file, const char* key_name, const char* key_
}
key_file.load(key_file_in);
} else {
std::ifstream key_file_in(get_internal_key_path(key_name).c_str(), std::fstream::binary);
std::string internal_key_path(get_internal_key_path(key_name));
std::ifstream key_file_in(internal_key_path.c_str(), std::fstream::binary);
if (!key_file_in) {
// TODO: include key name in error message
throw Error("Unable to open key file - have you unlocked/initialized this repository yet?");
throw Error("Unable to open key file: " + internal_key_path + " - have you unlocked/initialized this repository yet?");
}
key_file.load(key_file_in);
}
Expand Down