From: Dan Fuhry Date: Thu, 13 Nov 2025 23:53:48 +0000 (-0500) Subject: fsnotify: use os.Getwd instead of syscall.Getcwd X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=e863527d37a52864b005c69408d285fe26107637;p=runtime.git fsnotify: use os.Getwd instead of syscall.Getcwd --- diff --git a/mtls/fsnotify/util.go b/mtls/fsnotify/util.go index caf07cc..78bbd81 100644 --- a/mtls/fsnotify/util.go +++ b/mtls/fsnotify/util.go @@ -45,12 +45,11 @@ func isSymlink(fullPath string) bool { // getcwd returns the current working directory. func getcwd() string { - buf := make([]byte, 1024) - n, err := syscall.Getcwd(buf) + wd, err := os.Getwd() if err != nil { panic("could not get cwd") } - return string(buf[:n-1]) + return wd } // realpath removes "." components and replaces ".." components in an absolute or relative path,