stats opening and reading file, very poggers

This commit is contained in:
RafayAhmad7548 2025-07-06 06:33:59 +05:00
parent 611f29f325
commit 34db55a70c
4 changed files with 224 additions and 42 deletions

View file

@ -67,7 +67,7 @@ impl SshHandler for SshSession {
) -> Result<(), Self::Error> {
if name == "sftp" {
session.channel_success(channel_id)?;
let jail_dir = format!("/srv/sftp/{}", self.user.take().unwrap());
let jail_dir = format!("/srv/sftp/{}", self.user.as_ref().unwrap());
let sftp_handler = SftpSession::new(jail_dir);
russh_sftp::server::run(self.channel.take().ok_or(Self::Error::WrongChannel)?.into_stream(), sftp_handler).await;
}