"log"
"os"
"path/filepath"
- "syscall"
+ "ruderich.org/simon/safcm/cmd/safcm-remote/sync"
"ruderich.org/simon/safcm/cmd/safcm/config"
)
// chmodNoFollow works like os.Chmod but doesn't follow symlinks.
func chmodNoFollow(path string, mode fs.FileMode) error {
- x, err := os.OpenFile(path,
- os.O_RDONLY|syscall.O_NOFOLLOW|syscall.O_NONBLOCK, 0)
+ x, err := sync.OpenFileNoFollow(path)
if err != nil {
return err
}