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:
parent
7685516d1e
commit
8b659ae679
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue