feat: added the ability to edit files remotely

This commit is contained in:
Andrew Rioux
2023-09-08 22:48:02 -04:00
parent eb5e86067b
commit ae24c2e0ad
8 changed files with 146 additions and 24 deletions

View File

@@ -42,8 +42,6 @@ pub(super) fn start_file_download<'a, 'b: 'a>(
conninfo
.send(conninfo.encrypt_and_sign_resp(Response::StartDownloadFile(id, packet_count))?)?;
let mut current_packet_count = 0;
loop {
let mut file_data: Vec<Vec<u8>> = Vec::with_capacity(FILE_BUFFER_BUFFER_SIZE);
let mut buffer = [0u8; FILE_TRANSFER_PACKET_SIZE];

View File

@@ -43,6 +43,7 @@ pub(super) fn start_file_upload<'a, 'b: 'a>(
let mut target_file = OpenOptions::new()
.write(true)
.create(true)
.truncate(true)
.open(&file_path)?;
let mut current_packet_count = 0;