summaryrefslogtreecommitdiff
path: root/binaryninjaapi.cpp
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2018-12-17 22:31:00 -0500
committerRusty Wagner <rusty@vector35.com>2018-12-19 23:11:28 -0500
commit13c8d2edf601a0a61c5d1548b2bc66b5fab9ed78 (patch)
treef59e6d447d5497dd3e6d098a46e558e2eb377d49 /binaryninjaapi.cpp
parent76fd09369b6b6e728b2e38ff073ecd6b8f545fab (diff)
Add function to get path relative to main user path
Diffstat (limited to 'binaryninjaapi.cpp')
-rw-r--r--binaryninjaapi.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/binaryninjaapi.cpp b/binaryninjaapi.cpp
index b774cf2b..e70c45ab 100644
--- a/binaryninjaapi.cpp
+++ b/binaryninjaapi.cpp
@@ -142,6 +142,17 @@ string BinaryNinja::GetPathRelativeToUserPluginDirectory(const string& rel)
}
+string BinaryNinja::GetPathRelativeToUserDirectory(const string& rel)
+{
+ char* path = BNGetPathRelativeToUserDirectory(rel.c_str());
+ if (!path)
+ return rel;
+ string result = path;
+ BNFreeString(path);
+ return result;
+}
+
+
bool BinaryNinja::ExecuteWorkerProcess(const string& path, const vector<string>& args, const DataBuffer& input,
string& output, string& errors, bool stdoutIsText, bool stderrIsText)
{