X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=cmd%2Fsafcm-remote%2Fsync%2Ffiles.go;h=3e3c7ec18357e8a01e21e22906e6a5e79cb8257f;hb=ddd21f01f764a4ff61204d8e9d0ef8421ebf685c;hp=6e001a8186d14675864b4d90794d77694269cee0;hpb=bc439f5c4aabef1cccfe40233c2e467602a55a60;p=safcm%2Fsafcm.git diff --git a/cmd/safcm-remote/sync/files.go b/cmd/safcm-remote/sync/files.go index 6e001a8..3e3c7ec 100644 --- a/cmd/safcm-remote/sync/files.go +++ b/cmd/safcm-remote/sync/files.go @@ -376,7 +376,7 @@ reopen: os.Remove(tmpPath) return err } - err = syncPath(dir) + err = SyncPath(dir) if err != nil { return err } @@ -517,7 +517,7 @@ func WriteTemp(dir, base string, data []byte, uid, gid int, mode fs.FileMode) ( return tmpPath, nil } -// syncPath syncs path, which should be a directory. To guarantee durability +// SyncPath syncs path, which should be a directory. To guarantee durability // it must be called on a parent directory after adding, renaming or removing // files therein. // @@ -525,7 +525,7 @@ func WriteTemp(dir, base string, data []byte, uid, gid int, mode fs.FileMode) ( // fsync: "Calling fsync() does not necessarily ensure that the entry in the // directory containing the file has also reached disk. For that an explicit // fsync() on a file descriptor for the directory is also needed." -func syncPath(path string) error { +func SyncPath(path string) error { x, err := os.Open(path) if err != nil { return err