Merge pull request #827 from luoliwoshang/os/stat

[wip] os:correct error of noexist file & os.Error 's nil pointer dereference in linux
This commit is contained in:
xushiwei
2024-10-12 11:28:32 +08:00
committed by GitHub

View File

@@ -148,7 +148,7 @@ func Lstat(path string, stat *Stat_t) (err error) {
if ret == 0 { if ret == 0 {
return nil return nil
} }
return Errno(ret) return Errno(os.Errno)
} }
func Stat(path string, stat *Stat_t) (err error) { 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 { if ret == 0 {
return nil return nil
} }
return Errno(ret) return Errno(os.Errno)
} }
func Pipe(p []int) (err error) { func Pipe(p []int) (err error) {