mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
Revert "Don't require ./etc to exist in relocatable fish"
This reverts commit e2a3dae58b.
This idea failed because ./share was not complete when bliding via cmake;
it misses critical files such as config.fish.
This commit is contained in:
@@ -156,11 +156,12 @@ static struct config_paths_t determine_config_directory_paths(const char *argv0)
|
|||||||
paths.doc = base_path + (seems_installed ? L"/share/doc/fish" : L"/user_doc/html");
|
paths.doc = base_path + (seems_installed ? L"/share/doc/fish" : L"/user_doc/html");
|
||||||
paths.bin = base_path + (seems_installed ? L"/bin" : L"");
|
paths.bin = base_path + (seems_installed ? L"/bin" : L"");
|
||||||
|
|
||||||
// Check only that the data directories exist. Allow the sysconf dir to be invalid.
|
// Check only that the data and sysconf directories exist. Handle the doc
|
||||||
// Handle the doc directories separately.
|
// directories separately.
|
||||||
if (0 == waccess(paths.data, R_OK)) {
|
struct stat buf;
|
||||||
|
if (0 == wstat(paths.data, &buf) && 0 == wstat(paths.sysconf, &buf)) {
|
||||||
// The docs dir may not exist; in that case fall back to the compiled in path.
|
// The docs dir may not exist; in that case fall back to the compiled in path.
|
||||||
if (0 == waccess(paths.doc, R_OK)) {
|
if (0 != wstat(paths.doc, &buf)) {
|
||||||
paths.doc = L"" DOCDIR;
|
paths.doc = L"" DOCDIR;
|
||||||
}
|
}
|
||||||
done = true;
|
done = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user