mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Don't use symbolic path searching for USB detection (#1491)
The USB directories we care about are not symbolic links, so we can ignore them. There was a recursive symbolic link, which was causing failure.
This commit is contained in:
committed by
Peter Johnson
parent
6e8f8be370
commit
3721463eb3
@@ -215,9 +215,11 @@ void SerialHelper::QueryHubPaths(int32_t* status) {
|
||||
if (matchString.equals(devNameRef)) continue;
|
||||
|
||||
// Search directories to get a list of system accessors
|
||||
// The directories we need are not symbolic, so we can safely
|
||||
// disable symbolic links.
|
||||
std::error_code ec;
|
||||
for (auto p = wpi::sys::fs::recursive_directory_iterator(
|
||||
"/sys/devices/soc0", ec);
|
||||
"/sys/devices/soc0", ec, false);
|
||||
p != wpi::sys::fs::recursive_directory_iterator(); p.increment(ec)) {
|
||||
if (ec) break;
|
||||
wpi::StringRef path{p->path()};
|
||||
|
||||
Reference in New Issue
Block a user