diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-09-01 13:51:57 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-09-01 13:51:57 +0100 |
| commit | ae7dc3c576a0b44ed8eed7ace23b8ebedee3fdf2 (patch) | |
| tree | fb5db8a8135e99d1e3c862329c5fd77232bf370a /src | |
| parent | b512f3220f5408eff3bf9075db628dd6b41179e8 (diff) | |
Simplify runtime_directory
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main.cc b/src/main.cc index 9d58d84c..397a057a 100644 --- a/src/main.cc +++ b/src/main.cc @@ -34,11 +34,7 @@ using namespace Kakoune; String runtime_directory() { - String bin_path = get_kak_binary_path(); - auto it = find(reversed(bin_path), '/'); - if (it == bin_path.rend()) - throw runtime_error("unable to determine runtime directory"); - return StringView{bin_path.begin(), it.base()-1} + "/../share/kak"; + return split_path(get_kak_binary_path()).first + "../share/kak"; } static void write(int fd, StringView str) |
