mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-05 17:09:56 +00:00
Enable the lyx executable to be found from the PATH environment
variable if it expands to elements with relative paths. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@9487 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ccf68562d4
commit
42668ee079
@ -145,7 +145,7 @@ Package::Package(string const & command_line_arg0,
|
|||||||
<< "\tdocument_dir " << document_dir() << '\n'
|
<< "\tdocument_dir " << document_dir() << '\n'
|
||||||
<< "\ttemp_dir " << temp_dir() << '\n'
|
<< "\ttemp_dir " << temp_dir() << '\n'
|
||||||
<< "\thome_dir " << home_dir() << '\n'
|
<< "\thome_dir " << home_dir() << '\n'
|
||||||
<< "<\\package>\n" << std::endl;
|
<< "</package>\n" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -351,11 +351,10 @@ string const get_binary_path(string const & exe)
|
|||||||
std::vector<string>::const_iterator it = path.begin();
|
std::vector<string>::const_iterator it = path.begin();
|
||||||
std::vector<string>::const_iterator const end = path.end();
|
std::vector<string>::const_iterator const end = path.end();
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
if (!os::is_absolute_path(*it))
|
// This will do nothing if *it is already absolute.
|
||||||
// Someone is playing silly buggers.
|
string const exe_dir = MakeAbsPath(*it);
|
||||||
continue;
|
|
||||||
|
|
||||||
string const exe_path = AddName(*it, exe_name);
|
string const exe_path = AddName(exe_dir, exe_name);
|
||||||
if (lyx::FileInfo(exe_path, true).isOK())
|
if (lyx::FileInfo(exe_path, true).isOK())
|
||||||
return exe_path;
|
return exe_path;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user