From c01cca5b295475e9ec4245649c5adddeb265f5d6 Mon Sep 17 00:00:00 2001 From: Kyrian Obikwelu Date: Wed, 5 Jun 2024 08:41:22 +0100 Subject: [PATCH] bugfix: Repository url resolution not working properly in Windows --- src/Utils/Hub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Utils/Hub.php b/src/Utils/Hub.php index 816d260..8cc4313 100644 --- a/src/Utils/Hub.php +++ b/src/Utils/Hub.php @@ -203,10 +203,10 @@ private static function resolveRepositoryURL(string $pathOrRepoID, string $revis $remotePath = str_replace( ['{model}', '{revision}', '{file}'], - [$pathOrRepoID, $revision, joinPaths($subFolder, $fileName)], + [$pathOrRepoID, $revision, $subFolder === '' ? $fileName : "$subFolder/$fileName"], Transformers::$remotePathTemplate ); - return joinPaths($remoteHost, $remotePath); + return "$remoteHost/$remotePath"; } } \ No newline at end of file