From: Alex Brainman Date: Sat, 30 Oct 2010 12:55:22 +0000 (+1100) Subject: syscall: fix windows build X-Git-Tag: weekly.2010-11-02~29 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a8c4da996e69fcab48186011bb517ca915ac5f58;p=gostls13.git syscall: fix windows build R=golang-dev CC=golang-dev https://golang.org/cl/2713043 --- diff --git a/src/pkg/syscall/syscall_windows.go b/src/pkg/syscall/syscall_windows.go index 049e9e29b3..495855cf07 100644 --- a/src/pkg/syscall/syscall_windows.go +++ b/src/pkg/syscall/syscall_windows.go @@ -303,6 +303,9 @@ func getStdHandle(h int32) (fd int) { } func Stat(path string, stat *Stat_t) (errno int) { + if len(path) == 0 { + return ERROR_PATH_NOT_FOUND + } // Remove trailing slash. if path[len(path)-1] == '/' || path[len(path)-1] == '\\' { // Check if we're given root directory ("\" or "c:\").