LEFT | RIGHT |
(Both sides are equal) |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Windows system calls. | 5 // Windows system calls. |
6 | 6 |
7 package syscall | 7 package syscall |
8 | 8 |
9 import ( | 9 import ( |
10 errorspkg "errors" | 10 errorspkg "errors" |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 if uintptr(bytesReturned) < unsafe.Sizeof(*rdb) || | 993 if uintptr(bytesReturned) < unsafe.Sizeof(*rdb) || |
994 rdb.ReparseTag != IO_REPARSE_TAG_SYMLINK { | 994 rdb.ReparseTag != IO_REPARSE_TAG_SYMLINK { |
995 // the path is not a symlink but another type of reparse point | 995 // the path is not a symlink but another type of reparse point |
996 return -1, ENOENT | 996 return -1, ENOENT |
997 } | 997 } |
998 | 998 |
999 s := UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(&rdb.PathBuffer[0]))
[:rdb.PrintNameLength/2]) | 999 s := UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(&rdb.PathBuffer[0]))
[:rdb.PrintNameLength/2]) |
1000 n = copy(buf, []byte(s)) | 1000 n = copy(buf, []byte(s)) |
1001 return n, nil | 1001 return n, nil |
1002 } | 1002 } |
LEFT | RIGHT |