mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-20 08:50:21 +00:00
PR #13610 unfortunately disabled importing repositories from local paths. This PR restores this functionality. Fix #14700 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
c03f530212
commit
eb576269d4
2 changed files with 19 additions and 0 deletions
|
@ -52,6 +52,13 @@ func isMigrateURLAllowed(remoteURL string) error {
|
|||
}
|
||||
}
|
||||
|
||||
if u.Host == "" {
|
||||
if !setting.ImportLocalPaths {
|
||||
return &models.ErrMigrationNotAllowed{Host: "<LOCAL_FILESYSTEM>"}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
if !setting.Migrations.AllowLocalNetworks {
|
||||
addrList, err := net.LookupIP(strings.Split(u.Host, ":")[0])
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue