From 352ced7f18bedaae606d391c9592ce78a304f5b2 Mon Sep 17 00:00:00 2001 From: Frank de Jonge Date: Sat, 15 Jan 2022 20:04:28 +0100 Subject: [PATCH] Port fix and add backwards compatibility with old option --- src/PhpseclibV2/SftpAdapter.php | 2 +- src/PhpseclibV3/SftpAdapter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpseclibV2/SftpAdapter.php b/src/PhpseclibV2/SftpAdapter.php index b980ca3ab..3125825a4 100644 --- a/src/PhpseclibV2/SftpAdapter.php +++ b/src/PhpseclibV2/SftpAdapter.php @@ -204,7 +204,7 @@ public function deleteDirectory(string $path): void public function createDirectory(string $path, Config $config): void { - $this->makeDirectory($path, $config->get(Config::OPTION_DIRECTORY_VISIBILITY)); + $this->makeDirectory($path, $config->get(Config::OPTION_DIRECTORY_VISIBILITY, $config->get(Config::OPTION_VISIBILITY))); } public function setVisibility(string $path, string $visibility): void diff --git a/src/PhpseclibV3/SftpAdapter.php b/src/PhpseclibV3/SftpAdapter.php index e48cbaf07..e745dfd9b 100644 --- a/src/PhpseclibV3/SftpAdapter.php +++ b/src/PhpseclibV3/SftpAdapter.php @@ -204,7 +204,7 @@ public function deleteDirectory(string $path): void public function createDirectory(string $path, Config $config): void { - $this->makeDirectory($path, $config->get(Config::OPTION_DIRECTORY_VISIBILITY)); + $this->makeDirectory($path, $config->get(Config::OPTION_DIRECTORY_VISIBILITY, $config->get(Config::OPTION_VISIBILITY))); } public function setVisibility(string $path, string $visibility): void