|
|
|
@ -384,7 +384,6 @@ func ListNTFSDriverInfo(diskName string, folder uint8) ([]*FileStat, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func listNTFSDriverInfo(diskName string, fn func(string, uint8) bool, data map[win32api.DWORDLONG]FileEntry) ([]*FileStat, error) {
|
|
|
|
|
fmt.Println("finished 1")
|
|
|
|
|
pDriver := "\\\\.\\" + diskName[:len(diskName)-1]
|
|
|
|
|
fd, err := CreateFile(pDriver, syscall.O_RDONLY, win32api.FILE_ATTRIBUTE_NORMAL)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -420,7 +419,6 @@ func listNTFSDriverInfo(diskName string, fn func(string, uint8) bool, data map[w
|
|
|
|
|
i++
|
|
|
|
|
}
|
|
|
|
|
wg.Wait()
|
|
|
|
|
fmt.Println("finished 2")
|
|
|
|
|
(*reflect.SliceHeader)(unsafe.Pointer(&result)).Cap = i
|
|
|
|
|
(*reflect.SliceHeader)(unsafe.Pointer(&result)).Len = i
|
|
|
|
|
data = nil
|
|
|
|
|