diff --git a/apps/files_external/lib/Lib/Storage/SFTPReadStream.php b/apps/files_external/lib/Lib/Storage/SFTPReadStream.php index f28e15beb3..4889235a8e 100644 --- a/apps/files_external/lib/Lib/Storage/SFTPReadStream.php +++ b/apps/files_external/lib/Lib/Storage/SFTPReadStream.php @@ -84,6 +84,8 @@ class SFTPReadStream implements File { $logger = \OC::$server->getLogger(); [, $path] = explode('://', $path); + $path = '/' . ltrim($path); + $path = str_replace('//', '/', $path); $logger->warning("Opened sftp path: $path"); $this->loadContext('sftp');