Files
nfs/internal/nfsfs/symlinkrefused_linux.go
T

18 lines
410 B
Go
Raw Normal View History

// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
// SPDX-License-Identifier: MIT
//go:build linux
package nfsfs
import (
"errors"
"syscall"
)
// symlinkRefused reports whether an open refused a final component that is
// a symlink, the answer O_NOFOLLOW exists for. Linux answers ELOOP.
func symlinkRefused(err error) bool {
return errors.Is(err, syscall.ELOOP)
}