mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
13 lines
589 B
C++
13 lines
589 B
C++
|
|
#include "helpers.h"
|
|
|
|
std::vector<std::string> MakeAbsolutePaths(char *argv[]) {
|
|
std::vector<std::string> arr;
|
|
sandbox2::util::CharPtrArrToVecString(argv, &arr);
|
|
// std::transform(arr.begin(), arr.end(), arr.begin(), [](std::string s) -> std::string {
|
|
// return sandbox2::file_util::fileops::MakeAbsolute(s, sandbox2::file_util::fileops::GetCWD());
|
|
// });
|
|
auto f = std::bind(sandbox2::file_util::fileops::MakeAbsolute, std::placeholders::_1, sandbox2::file_util::fileops::GetCWD());
|
|
std::transform(arr.begin(), arr.end(), arr.begin(), f);
|
|
return arr;
|
|
} |