powerful but friendly backup program that runs in your tray, powered by restic devins.page/restray
go restic system-tray
2

Configure Feed

Select the types of activity you want to include in your feed.

fix: shell restic path

intergrav (Jun 29, 2026, 3:17 AM EDT) 103c8c31 1a42999f

+6 -12
+3 -9
config.go
··· 187 187 } 188 188 return filepath.Join(configDir(), name+".env") 189 189 } 190 - func localResticPath() string { 191 - if runtime.GOOS == "windows" { 192 - return filepath.Join(configDir(), "restic.exe") 193 - } 194 - return filepath.Join(configDir(), "restic") 195 - } 196 190 197 191 func logPath() string { return filepath.Join(configDir(), "restray.log") } 198 192 func lockPath() string { return filepath.Join(configDir(), "restray.lock") } ··· 287 281 for k, v := range vars { 288 282 env = append(env, k+"="+v) 289 283 } 290 - if p := localResticPath(); fileExists(p) { 284 + if p, _ := findRestic(); p != "" { 291 285 dir := filepath.Dir(p) 292 286 for i, e := range env { 293 287 if strings.HasPrefix(e, "PATH=") { ··· 318 312 for k, v := range vars { 319 313 fmt.Fprintf(script, "export %s=%q\n", k, v) 320 314 } 321 - if p := localResticPath(); fileExists(p) { 315 + if p, _ := findRestic(); p != "" { 322 316 fmt.Fprintf(script, "export PATH=%q:\"$PATH\"\n", filepath.Dir(p)) 323 317 } 324 318 fmt.Fprintf(script, "clear\n") ··· 345 339 for k, v := range vars { 346 340 fmt.Fprintf(script, "set %s=%s\r\n", k, v) 347 341 } 348 - if p := localResticPath(); fileExists(p) { 342 + if p, _ := findRestic(); p != "" { 349 343 fmt.Fprintf(script, "set PATH=%s;%%PATH%%\r\n", filepath.Dir(p)) 350 344 } 351 345 fmt.Fprintf(script, "echo %s\r\n", consoleMsg)
+1 -1
restic.go
··· 510 510 for k, v := range vars { 511 511 cmd.Env = append(cmd.Env, k+"="+v) 512 512 } 513 - if p := localResticPath(); fileExists(p) { 513 + if p, _ := findRestic(); p != "" { 514 514 dir := filepath.Dir(p) 515 515 for i, e := range cmd.Env { 516 516 if strings.HasPrefix(e, "PATH=") {
+2 -2
restic_manage_windows.go
··· 24 24 var downloading sync.Mutex 25 25 26 26 func managedRestic() string { 27 - p := localResticPath() 27 + p := filepath.Join(configDir(), "restic.exe") 28 28 if _, err := os.Stat(p); err == nil { 29 29 return p 30 30 } ··· 116 116 } 117 117 118 118 func installBinary(r io.Reader) error { 119 - p := localResticPath() 119 + p := filepath.Join(configDir(), "restic.exe") 120 120 tmp, err := os.CreateTemp(filepath.Dir(p), "restic-download-*") 121 121 if err != nil { 122 122 return err