mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 09:22:57 -05:00
dll: fuse: improve volname option handling
This commit is contained in:
@ -646,13 +646,8 @@ static NTSTATUS fsp_fuse_intf_GetVolumeInfo(FSP_FILE_SYSTEM *FileSystem,
|
||||
|
||||
VolumeInfo->TotalSize = (UINT64)stbuf.f_blocks * (UINT64)stbuf.f_frsize;
|
||||
VolumeInfo->FreeSize = (UINT64)stbuf.f_bfree * (UINT64)stbuf.f_frsize;
|
||||
|
||||
memcpy(&VolumeInfo->VolumeLabel, &f->VolumeLabel, sizeof f->VolumeLabel);
|
||||
int i;
|
||||
for(i = 0; i < sizeof VolumeInfo->VolumeLabel; i++)
|
||||
if(VolumeInfo->VolumeLabel[i] == L'\0')
|
||||
break;
|
||||
VolumeInfo->VolumeLabelLength = (UINT16)i;
|
||||
VolumeInfo->VolumeLabelLength = f->VolumeLabelLength;
|
||||
memcpy(&VolumeInfo->VolumeLabel, &f->VolumeLabel, f->VolumeLabelLength);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user