18 lines
410 B
Go
18 lines
410 B
Go
// 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)
|
||
|
|
}
|