]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix windows build
authorAlex Brainman <alex.brainman@gmail.com>
Sat, 30 Oct 2010 12:55:22 +0000 (23:55 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Sat, 30 Oct 2010 12:55:22 +0000 (23:55 +1100)
R=golang-dev
CC=golang-dev
https://golang.org/cl/2713043

src/pkg/syscall/syscall_windows.go

index 049e9e29b3bd71fa9614acb49805f0ab1ae30d9d..495855cf07e48337d47785b41c9ce62ea9b65683 100644 (file)
@@ -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:\").