Fixed scp transfer non returning DirectoryAlreadyExists
This commit is contained in:
parent
f6011543c0
commit
fc3803991a
|
@ -651,7 +651,9 @@ impl FileTransfer for ScpFileTransfer {
|
|||
info!("Making directory {}", dir.display());
|
||||
let p: PathBuf = self.wrkdir.clone();
|
||||
// If directory already exists, return Err
|
||||
if self.stat(dir.as_path()).is_ok() {
|
||||
let mut dir_stat_path: PathBuf = dir.clone();
|
||||
dir_stat_path.push("./");
|
||||
if self.stat(dir_stat_path.as_path()).is_ok() {
|
||||
error!("Directory {} already exists", dir.display());
|
||||
return Err(FileTransferError::new(
|
||||
FileTransferErrorType::DirectoryAlreadyExists,
|
||||
|
|
Loading…
Reference in a new issue