Skip to content

Commit

Permalink
Merge pull request #41 from CodeWithKyrian/40-problem-with-curl-reque…
Browse files Browse the repository at this point in the history
…st-in-downloaderphp

bugfix: Repository url resolution not working properly in Windows
  • Loading branch information
CodeWithKyrian authored Jun 5, 2024
2 parents 7f80870 + c01cca5 commit 67a6715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utils/Hub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}

0 comments on commit 67a6715

Please sign in to comment.