1
0
mirror of https://github.com/golang/go synced 2024-11-19 00:44:40 -07:00

syscall: fix windows build

R=golang-dev
CC=golang-dev
https://golang.org/cl/2713043
This commit is contained in:
Alex Brainman 2010-10-30 23:55:22 +11:00
parent 7812b79627
commit a8c4da996e

View 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:\").