From 01f56dca92967e81df4b7bb0b8ac19b4cc3a7f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rgen=20Brandt?= Date: Fri, 9 Apr 2021 13:17:23 +0200 Subject: [PATCH] fix get_repo_name --- src/gpull.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gpull.erl b/src/gpull.erl index 281e837..e4f4a9f 100644 --- a/src/gpull.erl +++ b/src/gpull.erl @@ -281,7 +281,10 @@ when is_binary( Prefix ), TrimmedEnd = string:trim( NoTrunk, trailing, "/" ), Found = string:find( TrimmedEnd, "/", trailing ), TrimmedFront = string:trim( Found, leading, "/" ), - binary_to_list( TrimmedFront ). + case is_binary( TrimmedFront ) of + true -> binary_to_list( TrimmedFront ); + false -> TrimmedFront + end.