Moved recv_file and send_file to an independent method (fix)

This commit is contained in:
ChristianVisintin
2020-12-20 14:47:37 +01:00
parent 5eabaf8ac2
commit 9171e0789f

View File

@@ -545,20 +545,20 @@ impl FileTransferActivity {
} }
// Apply file mode to file // Apply file mode to file
#[cfg(any(target_os = "unix", target_os = "macos", target_os = "linux"))] #[cfg(any(target_os = "unix", target_os = "macos", target_os = "linux"))]
if let Some(pex) = file.unix_pex { if let Some(pex) = remote.unix_pex {
if let Err(err) = self if let Err(err) = self
.context .context
.as_ref() .as_ref()
.unwrap() .unwrap()
.local .local
.chmod(local_file_path.as_path(), pex) .chmod(local, pex)
{ {
self.log( self.log(
LogLevel::Error, LogLevel::Error,
format!( format!(
"Could not apply file mode {:?} to \"{}\": {}", "Could not apply file mode {:?} to \"{}\": {}",
pex, pex,
local_file_path.display(), local.display(),
err err
) )
.as_ref(), .as_ref(),