fix: use C:\Program Files\backrest on both x64 and 32-bit (#200)

This commit is contained in:
John Maguire
2024-04-07 18:47:07 -07:00
committed by GitHub
parent ea0d8c772d
commit 7b0d3aa1be
+2 -5
View File
@@ -247,11 +247,8 @@ func FindOrInstallResticBinary() (string, error) {
// Check for restic installation in data directory.
resticInstallPath := path.Join(config.DataDir(), resticBinName)
if runtime.GOOS == "windows" {
programFiles := os.Getenv("programfiles(x86)")
if programFiles == "" {
programFiles = os.Getenv("programfiles")
}
resticInstallPath = path.Join(programFiles, "restic", resticBinName)
programFiles := os.Getenv("programfiles")
resticInstallPath = path.Join(programFiles, "backrest", resticBinName)
}
// Install restic if not found.