From ae91101ea11a163f854ef10084ab74d86e8f269f Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Fri, 11 Oct 2024 16:22:00 +0800 Subject: [PATCH] os:correct error of noexist file --- internal/lib/syscall/syscall.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/lib/syscall/syscall.go b/internal/lib/syscall/syscall.go index dce7fd0c..bac53d5d 100644 --- a/internal/lib/syscall/syscall.go +++ b/internal/lib/syscall/syscall.go @@ -148,7 +148,7 @@ func Lstat(path string, stat *Stat_t) (err error) { if ret == 0 { return nil } - return Errno(ret) + return Errno(os.Errno) } func Stat(path string, stat *Stat_t) (err error) { @@ -156,7 +156,7 @@ func Stat(path string, stat *Stat_t) (err error) { if ret == 0 { return nil } - return Errno(ret) + return Errno(os.Errno) } func Pipe(p []int) (err error) {