From 4dad0f1bddd1e5c0655db0d7a975a1de52c23f22 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 31 Mar 2023 13:53:22 +0200 Subject: [PATCH] wip #5611 --- src/Transfer/Driver.php | 4 ++-- src/Transfer/Local.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Transfer/Driver.php b/src/Transfer/Driver.php index 53c1d30..7381e8e 100644 --- a/src/Transfer/Driver.php +++ b/src/Transfer/Driver.php @@ -31,7 +31,7 @@ abstract class Driver { $this->_server = $server; } - protected static function _cleanInstallDir($path) { + public static function cleanInstallDir($path) { $path = str_replace('/\.{2,}/', '', $path); $path = preg_replace('/\/{2,}/', '/', $path); $path = trim($path, '/'); @@ -39,7 +39,7 @@ abstract class Driver { } protected function _destPath($path) { - return self::_cleanInstallDir($path); + return self::cleanInstallDir($path); } /** diff --git a/src/Transfer/Local.php b/src/Transfer/Local.php index 56092e3..b0b1a30 100644 --- a/src/Transfer/Local.php +++ b/src/Transfer/Local.php @@ -33,7 +33,7 @@ class Local extends Driver { * @return string */ protected function _destPath($path) { - return rtrim($this->getRootPath(), '/') . '/' . self::_cleanInstallDir($path) . '/'; + return rtrim($this->getRootPath(), '/') . '/' . self::cleanInstallDir($path) . '/'; } public function copy($source, $dest, $mirror = false, $dryrun = false) { -- 2.39.5