Browse Source

fix: #82 urls with fingerprint component break adding repo

pull/83/head v0.8.1
Thomas Dickson 9 months ago
parent
commit
be136038d0
  1. 2
      main.go
  2. 5
      repo.go

2
main.go

@ -15,7 +15,7 @@ import (
const cmdName = "fdroidcl"
const version = "v0.8.0"
const version = "v0.8.1"
func subdir(dir, name string) string {
p := filepath.Join(dir, name)

5
repo.go

@ -1,10 +1,12 @@
// Copyright (c) 2015, Daniel Martí <mvdan@mvdan.cc>
// Copyright (c) 2015, Daniel Martí <mvdan@mvdan.cc>
// Copyright (c) 2025, Thomas Dickson <modscrat+git@gmail.com>
// See LICENSE for licensing information
package main
import (
"fmt"
"strings"
)
var cmdRepo = &Command{
@ -90,6 +92,7 @@ func addRepo(name, url string) error {
if repoIndex(name) != -1 {
return fmt.Errorf("a repo with the same name \"%s\" exists already", name)
}
url = strings.Split(url, "?")[0]
config.Repos = append(config.Repos, repo{ID: name, URL: url, Enabled: true})
return writeConfig(&config)
}

Loading…
Cancel
Save