feat: allow access to relocated repos

This commit is contained in:
Valentin Doreau 2024-04-03 08:13:42 +02:00
parent 381cf6b44b
commit 064444db38
Signed by: vdoreau
GPG Key ID: F3E456CF9A14098B
2 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,7 @@ func (info *Info) LastmodUnix() float64 {
func GetInfo(path string) (*Info, error) {
cmd := exec.Command("borg", "info", "--json", path)
cmd.Env = append(cmd.Env, "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes")
cmd.Env = append(cmd.Env, "BORG_RELOCATED_REPO_ACCESS_IS_OK=yes")
stdout, err := cmd.Output()
if err != nil {

View File

@ -28,6 +28,7 @@ func (list *List) LastArchiveUnix() float64 {
func GetList(path string) (*List, error) {
cmd := exec.Command("borg", "list", "--json", path)
cmd.Env = append(cmd.Env, "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes")
cmd.Env = append(cmd.Env, "BORG_RELOCATED_REPO_ACCESS_IS_OK=yes")
stdout, err := cmd.Output()
if err != nil {