Skip to content

Commit

Permalink
fix string/fs:path conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
vmatare committed Oct 16, 2024
1 parent 7015896 commit b27058a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hwmon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ vector<string> HwmonInterface<HwmonT>::find_hwmons_by_name(
return result; // don't recurse to subdirs
}

for (const filesystem::path &subdir : dir_entries<filter_subdirs>(path)) {
for (const filesystem::path subdir : dir_entries<filter_subdirs>(path)) {
struct stat statbuf;
int err = stat(path.c_str(), &statbuf);
if (err || (statbuf.st_mode & S_IFMT) != S_IFDIR)
Expand Down Expand Up @@ -185,7 +185,7 @@ vector<string> HwmonInterface<HwmonT>::find_hwmons_by_model(
return result; // don't recurse to subdirs
}

for (const filesystem::path &subdir : dir_entries<filter_subdirs>(path)) {
for (const filesystem::path subdir : dir_entries<filter_subdirs>(path)) {
struct stat statbuf;
int err = stat(path.c_str(), &statbuf);
if (err || (statbuf.st_mode & S_IFMT) != S_IFDIR)
Expand Down

0 comments on commit b27058a

Please sign in to comment.