vendor: update github.com/t3rm1n4l/go-mega and dependencies

This is to fix a crash reported in #3140
This commit is contained in:
Nick Craig-Wood
2019-05-01 16:09:50 +01:00
parent 48c09608ea
commit 8f89b03d7b
135 changed files with 27990 additions and 605 deletions
+13
View File
@@ -86,6 +86,7 @@ var (
procFindNextFileW = modkernel32.NewProc("FindNextFileW")
procFindClose = modkernel32.NewProc("FindClose")
procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx")
procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
@@ -772,6 +773,18 @@ func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (e
return
}
func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = errnoErr(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
n = uint32(r0)