python/hypothesis: update to 6.121.0
[oi-userland.git] / components / network / domoticz / patches / 006-1WireByOWFS.cpp.patch
blob64d01611f6884b640b2d366346e0a7785c895210
1 --- domoticz-2022.1/hardware/1Wire/1WireByOWFS.cpp.bak Tue Jun 14 13:18:03 2022
2 +++ domoticz-2022.1/hardware/1Wire/1WireByOWFS.cpp Tue Jun 14 13:21:58 2022
3 @@ -378,7 +378,9 @@
4 bool C1WireByOWFS::IsValidDir(const struct dirent*const de)
6 // Check dirent type
7 - if (de->d_type!=DT_DIR)
8 + struct stat s;
9 + stat(de->d_name, &s);
10 + if (!(s.st_mode & S_IFDIR))
11 return false;
13 // Filter system dirs "." and ".."
14 @@ -444,7 +446,9 @@
15 while ((de = readdir(d)))
17 name = de->d_name;
18 - if (de->d_type == DT_DIR)
19 + struct stat s;
20 + stat(de->d_name, &s);
21 + if (s.st_mode & S_IFDIR)
23 if ( ((family == Environmental_Monitors) && (name.compare(0, 3, "EDS") == 0))
24 || ((family == smart_battery_monitor) && (name.compare(0, 7, "B1-R1-A") == 0)) ) {