Skip to content

Commit

Permalink
Port fix and add backwards compatibility with old option
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Jan 15, 2022
1 parent 9ce8c28 commit 352ced7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PhpseclibV2/SftpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/PhpseclibV3/SftpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 352ced7

Please sign in to comment.