fix(util/lean_path): change the default LEAN_PATH, a file in the current directory cannot shadow a library file, fixes #321

This commit is contained in:
Leonardo de Moura 2014-11-14 17:23:09 -08:00
parent 7685516d1e
commit 8b659ae679

View file

@ -125,12 +125,12 @@ void init_lean_path() {
#else
char * r = getenv("LEAN_PATH");
if (r == nullptr) {
*g_lean_path = ".";
std::string exe_path = get_path(get_exe_location());
*g_lean_path += g_path_sep;
*g_lean_path += exe_path + g_sep + ".." + g_sep + "library";
*g_lean_path = exe_path + g_sep + ".." + g_sep + "library";
*g_lean_path += g_path_sep;
*g_lean_path += exe_path + g_sep + ".." + g_sep + "lib" + g_sep + "lean";
*g_lean_path += g_path_sep;
*g_lean_path += ".";
} else {
*g_lean_path = r;
}