diff options
author | David Robillard <d@drobilla.net> | 2015-01-10 02:53:31 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-01-10 02:53:31 +0000 |
commit | ea59b3a8d2887e963b806c5f595f5d4e6460fc55 (patch) | |
tree | 94fcd7b385db257b216854e865e39ed41139295e /src/binary_location.h | |
parent | b608165e9162d2d429de47bbc430ecae136d3455 (diff) | |
download | patchage-ea59b3a8d2887e963b806c5f595f5d4e6460fc55.tar.gz patchage-ea59b3a8d2887e963b806c5f595f5d4e6460fc55.tar.bz2 patchage-ea59b3a8d2887e963b806c5f595f5d4e6460fc55.zip |
More Mac integration work.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5511 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/binary_location.h')
-rw-r--r-- | src/binary_location.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/binary_location.h b/src/binary_location.h index 91e8b29..303a3bd 100644 --- a/src/binary_location.h +++ b/src/binary_location.h @@ -41,3 +41,14 @@ binary_location() } return loc; } + +/** Return the absolute path of the bundle (binary parent directory). */ +static std::string +bundle_location() +{ + const std::string binary = binary_location(); + if (binary.empty()) { + return ""; + } + return binary.substr(0, binary.find_last_of('/')); +} |