X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=common%2Ftrace_resource.cpp;h=8a1f56cb1b9ca88c825579c98608a6ae5a2c2db1;hb=56ad11c7849c7e6ca0ad66558cb1a99c58d4cd3d;hp=35d2b1a73cc6a9464b3bee03720ee1cd85a4df23;hpb=ab6ded73916c5ea5ffee7a44b5c00eab78626b1c;p=apitrace diff --git a/common/trace_resource.cpp b/common/trace_resource.cpp index 35d2b1a..8a1f56c 100644 --- a/common/trace_resource.cpp +++ b/common/trace_resource.cpp @@ -36,38 +36,6 @@ namespace trace { -os::String -findFile(const char *relPath, - const char *absPath, - bool verbose) -{ - os::String complete; - - /* First look in the same directory from which this process is - * running, (to support developers running a compiled program that - * has not been installed. */ - os::String process_dir = os::getProcessName(); - process_dir.trimFilename(); - - complete = process_dir; - complete.join(relPath); - - if (complete.exists()) - return complete; - - /* Second, look in the directory for installed wrappers. */ - complete = absPath; - if (complete.exists()) - return complete; - - if (verbose) { - std::cerr << "error: cannot find " << relPath << " or " << absPath << "\n"; - } - - return ""; -} - - os::String findScript(const char *scriptFilename) { @@ -101,7 +69,7 @@ findScript(const char *scriptFilename) #ifndef _WIN32 // Try absolute install directory - scriptPath = APITRACE_WRAPPER_INSTALL_DIR; + scriptPath = APITRACE_SCRIPTS_INSTALL_DIR; scriptPath.join(scriptFilename); if (scriptPath.exists()) { return scriptPath;