mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-13 00:47:05 +02:00
refactor: Block unsafe fs::path std::string conversion calls
There is no change in behavior. This just helps prepare for the transition from boost::filesystem to std::filesystem by avoiding calls to methods which will be unsafe after the transaction to std::filesystem to due lack of a boost::filesystem::path::imbue equivalent and inability to set a predictable locale. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Co-authored-by: Kiminuo <kiminuo@protonmail.com> Co-authored-by: MarcoFalke <falke.marco@gmail.com>
This commit is contained in:
@ -30,8 +30,8 @@ public:
|
||||
return mp::SpawnProcess(pid, [&](int fd) {
|
||||
fs::path path = argv0_path;
|
||||
path.remove_filename();
|
||||
path.append(new_exe_name);
|
||||
return std::vector<std::string>{path.string(), "-ipcfd", strprintf("%i", fd)};
|
||||
path /= fs::PathFromString(new_exe_name);
|
||||
return std::vector<std::string>{fs::PathToString(path), "-ipcfd", strprintf("%i", fd)};
|
||||
});
|
||||
}
|
||||
int waitSpawned(int pid) override { return mp::WaitProcess(pid); }
|
||||
|
Reference in New Issue
Block a user