mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 07:11:08 +00:00
cmd/syncthing: Use correct binary when restarting monitor (#8919)
This commit is contained in:
parent
3d78ff9f68
commit
5a3ac86c3f
@ -346,7 +346,7 @@ func restartMonitor(binary string, args []string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func restartMonitorUnix(binary string, args []string) error {
|
func restartMonitorUnix(binary string, args []string) error {
|
||||||
return syscall.Exec(args[0], args, os.Environ())
|
return syscall.Exec(binary, args, os.Environ())
|
||||||
}
|
}
|
||||||
|
|
||||||
func restartMonitorWindows(binary string, args []string) error {
|
func restartMonitorWindows(binary string, args []string) error {
|
||||||
@ -521,7 +521,7 @@ func (f *autoclosedFile) ensureOpenLocked() error {
|
|||||||
// We open the file for write only, and create it if it doesn't exist.
|
// We open the file for write only, and create it if it doesn't exist.
|
||||||
flags := os.O_WRONLY | os.O_CREATE | os.O_APPEND
|
flags := os.O_WRONLY | os.O_CREATE | os.O_APPEND
|
||||||
|
|
||||||
fd, err := os.OpenFile(f.name, flags, 0644)
|
fd, err := os.OpenFile(f.name, flags, 0o644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user