mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Allocate more buffer (#9683)
The documentation states that `nVolumeNameSize` and `nFileSystemNameSize` are: > The length of a volume name buffer, in TCHARs. The maximum buffer size is MAX_PATH+1. It seems like we allocated too little for them before, so expand it to 260 wchars.
This commit is contained in:
parent
d0ae69087c
commit
de6c286258
@ -34,7 +34,7 @@ func getFSType(path string) string {
|
||||
volumeNameSize, nFileSystemNameSize := uint32(260), uint32(260)
|
||||
var lpVolumeSerialNumber uint32
|
||||
var lpFileSystemFlags, lpMaximumComponentLength uint32
|
||||
var lpFileSystemNameBuffer, volumeName [130]uint16
|
||||
var lpFileSystemNameBuffer, volumeName [260]uint16
|
||||
var ps = syscall.StringToUTF16Ptr(filepath.VolumeName(path))
|
||||
|
||||
// Extract values safely
|
||||
|
Loading…
Reference in New Issue
Block a user