Skip to content

Commit 4194e56

Browse files
committed
DiskIO (Windows): better name detection for Github Action
1 parent a0343d6 commit 4194e56

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/detection/diskio/diskio_windows.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options)
3737
// SCSI\Disk&Ven_NVMe&Prod_WDC_PC_SN810_SDC\5&19cebb7&0&000000
3838
uint32_t index = ffStrbufFirstIndexC(&device->name, '\\');
3939
if (index != device->name.length)
40+
{
4041
ffStrbufAppendNS(&device->type, index, device->name.chars); // SCSI
42+
ffStrbufSubstrAfter(&device->name, index + 1);
43+
}
4144
ffStrbufSubstrBeforeLastC(&device->name, '\\');
4245
ffStrbufSubstrAfterFirstS(&device->name, "&Ven_");
4346
ffStrbufRemoveS(&device->name, "&Prod");
4447
ffStrbufReplaceAllC(&device->name, '_', ' ');
48+
ffStrbufTrim(&device->name, ' ');
4549
}
4650
else
4751
ffStrbufSetWS(&device->name, szDevice);

0 commit comments

Comments
 (0)