Merge branch 'master' into pager

This commit is contained in:
ridiculousfish 2014-01-17 14:21:08 -08:00
commit 9920047b34

View file

@ -187,11 +187,16 @@ static struct config_paths_t determine_config_directory_paths(const char *argv0)
paths.sysconf = base_path + L"/etc/fish";
paths.doc = base_path + L"/share/doc/fish";
paths.bin = base_path + L"/bin";
/* Check only that the data and sysconf directories exist. Handle the doc directories separately */
struct stat buf;
if (0 == wstat(paths.data, &buf) && 0 == wstat(paths.sysconf, &buf) &&
0 == wstat(paths.doc, &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 */
if (0 != wstat(paths.doc, &buf))
{
paths.doc = L"" DOCDIR;
}
done = true;
}
}