MCPcopy
hub / github.com/syncthing/syncthing / checkRemoteInSync

Function checkRemoteInSync

test/util.go:553–565  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

551// checkRemoteInSync checks if the devices associated twith the given processes
552// are in sync according to the remote status on both sides.
553func 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}

Callers 2

scSyncAndCompareFunction · 0.85

Calls 2

RemoteInSyncMethod · 0.80
IDMethod · 0.65

Tested by 2

scSyncAndCompareFunction · 0.68