mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-06 09:35:20 +00:00
fix up test ProcessOpenFilesTest.test_sanity
Summary: It fails on some platforms because of permissions, let's just check if file path is not empty and is absolute Reviewed By: marekcirkos Differential Revision: D14086996 fbshipit-source-id: 98068e4b93e6be12a2392345fa74b547d26a2d43
This commit is contained in:
parent
464fa46788
commit
676820998e
@ -50,12 +50,7 @@ bool checkProcessOpenFilePath(std::string const& value){
|
||||
return true;
|
||||
}
|
||||
auto const path = boost::filesystem::path(value);
|
||||
// On macosx unlinked pathnames is not marked
|
||||
if (isPlatform(PlatformType::TYPE_OSX)) {
|
||||
return !path.empty() && path.is_absolute();
|
||||
}
|
||||
auto const status = boost::filesystem::status(path);
|
||||
return boost::filesystem::exists(status);
|
||||
return !path.empty() && path.is_absolute();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user