diff options
Diffstat (limited to 'libbpkg/manifest.cxx')
-rw-r--r-- | libbpkg/manifest.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libbpkg/manifest.cxx b/libbpkg/manifest.cxx index 9859a47..306649d 100644 --- a/libbpkg/manifest.cxx +++ b/libbpkg/manifest.cxx @@ -1524,7 +1524,7 @@ namespace bpkg repository_url_traits::string_type repository_url_traits:: translate_scheme (string_type& url, const scheme_type& scheme, - const optional<authority_type>& /*authority*/, + const optional<authority_type>& authority, const optional<path_type>& path, const optional<string_type>& /*query*/, const optional<string_type>& fragment) @@ -1536,16 +1536,10 @@ namespace bpkg case scheme_type::git: return "git"; case scheme_type::file: { - // If there is no fragment present then represent the URL object as a - // local path. - // assert (path); - if (fragment) - { - assert (path->absolute ()); + if (path->absolute () && (fragment || authority)) return "file"; - } url = path->relative () ? path->posix_string () : path->string (); return string_type (); |