diff --git a/src/detection/gpu/gpu_linux.c b/src/detection/gpu/gpu_linux.c index 69ffdd9d5..5ea018bec 100644 --- a/src/detection/gpu/gpu_linux.c +++ b/src/detection/gpu/gpu_linux.c @@ -46,7 +46,12 @@ static void pciDetectAmdSpecific(const FFGPUOptions* options, FFGPUResult* gpu, ffStrbufAppendS(pciDir, "/hwmon/"); FF_AUTO_CLOSE_DIR DIR* dirp = opendir(pciDir->chars); - struct dirent* entry = readdir(dirp); + struct dirent* entry; + while ((entry = readdir(dirp)) != NULL) + { + if (entry->d_name[0] == '.') continue; + break; + } if (!entry) return; ffStrbufAppendS(pciDir, entry->d_name); ffStrbufAppendC(pciDir, '/');