Editor FINISHED
saving works
This commit is contained in:
@@ -374,9 +374,19 @@ void arg_editor(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *
|
||||
}
|
||||
|
||||
LoginInfoPointer lip = get_logininfo_pointer_from_buffer(decrypted_buffer, pass);
|
||||
edit_file(lip.password);
|
||||
int len = 0;
|
||||
char *new_buff = edit_file(lip.password, len);
|
||||
if (new_buff == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// delete_logininfo_from_buffer(decrypted_buffer, pass);
|
||||
// Aes256::encrypt(key, decrypted_buffer, encrypted_buffer);
|
||||
// encrypted_buffer.save_to_file();
|
||||
std::string lable = lip.label;
|
||||
std::string username = lip.username;
|
||||
|
||||
delete_logininfo_from_buffer(decrypted_buffer, pass);
|
||||
add_logininfo_to_buffer(decrypted_buffer, lable.c_str(), lable.size(), username.c_str(), username.size(), new_buff, len);
|
||||
|
||||
Aes256::encrypt(key, decrypted_buffer, encrypted_buffer);
|
||||
encrypted_buffer.save_to_file();
|
||||
}
|
||||
Reference in New Issue
Block a user