mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +00:00
mount-utils: IsMountPoint: fix
Commit44bea35804
added a code to return unwrapped fs.ErrNotExist error in case filepath.EvalSymlinks failed a wrapped one. This never worked because of a copy/paste bug. Fix this. Fixes:44bea35804
Cc: Manu Gupta <manugupt1@gmail.com> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
167252fb5e
commit
4bb0239279
@ -766,7 +766,7 @@ func (mounter *Mounter) IsMountPoint(file string) (bool, error) {
|
|||||||
// Resolve any symlinks in file, kernel would do the same and use the resolved path in /proc/mounts.
|
// Resolve any symlinks in file, kernel would do the same and use the resolved path in /proc/mounts.
|
||||||
resolvedFile, err := filepath.EvalSymlinks(file)
|
resolvedFile, err := filepath.EvalSymlinks(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(isMntErr, fs.ErrNotExist) {
|
if errors.Is(err, fs.ErrNotExist) {
|
||||||
return false, fs.ErrNotExist
|
return false, fs.ErrNotExist
|
||||||
}
|
}
|
||||||
return false, err
|
return false, err
|
||||||
|
Loading…
Reference in New Issue
Block a user