Phase 17: SCP over SFTP subsystem + EOF/CLOSE fixes
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled

This commit is contained in:
Warren
2026-06-20 16:31:00 +08:00
parent 56217bc9a5
commit 5b439dfbef
3 changed files with 88 additions and 16 deletions

View File

@@ -10,11 +10,11 @@ use std::path::{Path, PathBuf};
/// SCP Handler参考OpenSSH scp.c
pub struct ScpHandler {
root_dir: PathBuf,
pub root_dir: PathBuf,
mode: ScpMode,
recursive: bool,
preserve_times: bool,
vfs: Box<dyn VfsBackend>,
pub vfs: Box<dyn VfsBackend>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -372,7 +372,7 @@ impl ScpHandler {
}
/// 路径解析(安全性检查)
fn resolve_path(&self, path: &str) -> Result<PathBuf> {
pub fn resolve_path(&self, path: &str) -> Result<PathBuf> {
let full_path = self.root_dir.join(path);
let canonical_path = self