diff options
Diffstat (limited to 'src/tor.cpp')
| -rw-r--r-- | src/tor.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tor.cpp b/src/tor.cpp index e47ee44..20b4577 100644 --- a/src/tor.cpp +++ b/src/tor.cpp | |||
| @@ -500,6 +500,21 @@ static std::string ResolveTorPath(const std::string& torPathOpt) | |||
| 500 | #endif | 500 | #endif |
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | bool BtfBundledTorPath(std::string& torPathOut) | ||
| 504 | { | ||
| 505 | torPathOut.clear(); | ||
| 506 | std::string exeDir = ExecutableDir(); | ||
| 507 | #ifdef _WIN32 | ||
| 508 | std::string path = PathJoin(exeDir, "tor/tor.exe"); | ||
| 509 | #else | ||
| 510 | std::string path = PathJoin(exeDir, "tor/tor"); | ||
| 511 | #endif | ||
| 512 | if (!FileIsExecutableCandidate(path)) | ||
| 513 | return false; | ||
| 514 | torPathOut = path; | ||
| 515 | return true; | ||
| 516 | } | ||
| 517 | |||
| 503 | std::string BtfBuildManagedTorrcForTest(const std::string& dataDir, | 518 | std::string BtfBuildManagedTorrcForTest(const std::string& dataDir, |
| 504 | const std::string& hiddenServiceDir, | 519 | const std::string& hiddenServiceDir, |
| 505 | unsigned short socksPort, | 520 | unsigned short socksPort, |