IO (Linux): improve performance of ffPathExists

This commit is contained in:
李通洲 committed 2024-10-15 19:40:03 +08:00
1 parent 2b2c223d22
commit ae76d2d032
5 files changed
+21 -15

No files matched your search

+1 -1
View File
@@ -274,7 +274,7 @@ const char* ffDetectWifi(FF_MAYBE_UNUSED FFlist* result)
for(struct if_nameindex* i = infs; !(i->if_index == 0 && i->if_name == NULL); ++i)
{
ffStrbufSetF(&buffer, "/sys/class/net/%s/phy80211", i->if_name);
ffStrbufSetF(&buffer, "/sys/class/net/%s/phy80211/", i->if_name);
if(!ffPathExists(buffer.chars, FF_PATHTYPE_DIRECTORY))
continue;