list = g_slist_prepend(list, pkg);
if ((!pkg->location_base || *pkg->location_base == '\0') && repopath) {
_cleanup_free_ gchar *repopath_with_protocol = NULL;
- repopath_with_protocol = g_strconcat("file://", repopath, NULL);
+ if (*repopath == '/')
+ // Repo path is local absolute path
+ repopath_with_protocol = g_strconcat("file://", repopath, NULL);
+ else
+ repopath_with_protocol = g_strdup(repopath);
pkg->location_base = cr_safe_string_chunk_insert(pkg->chunk, repopath_with_protocol);
}
g_hash_table_insert (merged, (gpointer) pkg->name, (gpointer) list);