checkRemoteInSync checks if the devices associated twith the given processes are in sync according to the remote status on both sides.
(folder string, p1, p2 *rc.Process)
| 551 | // checkRemoteInSync checks if the devices associated twith the given processes |
| 552 | // are in sync according to the remote status on both sides. |
| 553 | func checkRemoteInSync(folder string, p1, p2 *rc.Process) error { |
| 554 | if inSync, err := p1.RemoteInSync(folder, p2.ID()); err != nil { |
| 555 | return err |
| 556 | } else if !inSync { |
| 557 | return fmt.Errorf(`from device %v folder "%v" is not in sync on device %v`, p1.ID(), folder, p2.ID()) |
| 558 | } |
| 559 | if inSync, err := p2.RemoteInSync(folder, p1.ID()); err != nil { |
| 560 | return err |
| 561 | } else if !inSync { |
| 562 | return fmt.Errorf(`from device %v folder "%v" is not in sync on device %v`, p2.ID(), folder, p1.ID()) |
| 563 | } |
| 564 | return nil |
| 565 | } |