From 42668ee07939372e86ab661eabeb52bf1da76daa Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Mon, 17 Jan 2005 11:50:16 +0000 Subject: [PATCH] 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 --- src/support/package.C | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/support/package.C b/src/support/package.C index e355949d91..700e5d69ee 100644 --- a/src/support/package.C +++ b/src/support/package.C @@ -145,7 +145,7 @@ Package::Package(string const & command_line_arg0, << "\tdocument_dir " << document_dir() << '\n' << "\ttemp_dir " << temp_dir() << '\n' << "\thome_dir " << home_dir() << '\n' - << "<\\package>\n" << std::endl; + << "\n" << std::endl; } @@ -351,11 +351,10 @@ string const get_binary_path(string const & exe) std::vector::const_iterator it = path.begin(); std::vector::const_iterator const end = path.end(); for (; it != end; ++it) { - if (!os::is_absolute_path(*it)) - // Someone is playing silly buggers. - continue; + // This will do nothing if *it is already absolute. + string const exe_dir = MakeAbsPath(*it); - string const exe_path = AddName(*it, exe_name); + string const exe_path = AddName(exe_dir, exe_name); if (lyx::FileInfo(exe_path, true).isOK()) return exe_path; }