mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
Fix when fish isn't already installed
This was still wrong.
This commit is contained in:
parent
af0f9e5308
commit
3d8e8a8715
1 changed files with 2 additions and 2 deletions
|
@ -126,14 +126,14 @@ static struct config_paths_t determine_config_directory_paths(const char *argv0)
|
|||
// link CF, use this lame approach to test it: see if the resolved path ends with
|
||||
// /Contents/MacOS/fish, case insensitive since HFS+ usually is.
|
||||
if (!done) {
|
||||
const char *suffix = "/Contents/Resources/base/bin/fish";
|
||||
const char *suffix = "Contents/Resources/base/bin/fish";
|
||||
const size_t suffixlen = strlen(suffix);
|
||||
if (has_suffix(exec_path, suffix, true)) {
|
||||
// Looks like we're a bundle. Cut the string at the / prefixing /Contents... and
|
||||
// then the rest.
|
||||
wcstring wide_resolved_path = str2wcstring(exec_path);
|
||||
wide_resolved_path.resize(exec_path.size() - suffixlen);
|
||||
wide_resolved_path.append(L"/Contents/Resources/");
|
||||
wide_resolved_path.append(L"Contents/Resources/base/");
|
||||
|
||||
// Append share, etc, doc.
|
||||
paths.data = wide_resolved_path + L"share/fish";
|
||||
|
|
Loading…
Reference in a new issue