Phase 17: SCP over SFTP subsystem + EOF/CLOSE fixes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user