Fix SFTP path resolution and EOF handling
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled

- Fix resolve_path() to handle non-existent files (for upload)
- Add SSH_MSG_CHANNEL_EOF handling in service loop
- Canonicalize root_dir in SftpHandler constructor
- SFTP now fully working: pwd, ls, cd, get, put operations verified
This commit is contained in:
Warren
2026-06-15 13:14:16 +08:00
parent 4122ceac94
commit 91d29e40ea
3 changed files with 30 additions and 9 deletions

View File

@@ -345,6 +345,10 @@ fn handle_ssh_service_loop(
}
break;
}
Some(&pt) if pt == PacketType::SSH_MSG_CHANNEL_EOF as u8 => {
info!("Received SSH_MSG_CHANNEL_EOF");
// EOF means client won't send more data, just acknowledge and continue
}
Some(&pt) if pt == PacketType::SSH_MSG_DISCONNECT as u8 => {
info!("Received SSH_MSG_DISCONNECT");
break;