mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 20:25:12 +00:00
Relax the requirement that we find a working 'doc' directory in order
for fish to be relocatable. Instead we only look for data and configuration path
This commit is contained in:
parent
8e77aca854
commit
b758c0c335
1 changed files with 8 additions and 3 deletions
11
fish.cpp
11
fish.cpp
|
@ -187,11 +187,16 @@ static struct config_paths_t determine_config_directory_paths(const char *argv0)
|
||||||
paths.sysconf = base_path + L"/etc/fish";
|
paths.sysconf = base_path + L"/etc/fish";
|
||||||
paths.doc = base_path + L"/share/doc/fish";
|
paths.doc = base_path + L"/share/doc/fish";
|
||||||
paths.bin = base_path + L"/bin";
|
paths.bin = base_path + L"/bin";
|
||||||
|
|
||||||
|
/* Check only that the data and sysconf directories exist. Handle the doc directories separately */
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
if (0 == wstat(paths.data, &buf) && 0 == wstat(paths.sysconf, &buf) &&
|
if (0 == wstat(paths.data, &buf) && 0 == wstat(paths.sysconf, &buf))
|
||||||
0 == wstat(paths.doc, &buf))
|
|
||||||
{
|
{
|
||||||
|
/* The docs dir may not exist; in that case fall back to the compiled in path */
|
||||||
|
if (0 != wstat(paths.doc, &buf))
|
||||||
|
{
|
||||||
|
paths.doc = L"" DOCDIR;
|
||||||
|
}
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue