mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-09-28 15:08:51 +00:00
Fix PATH reading
This commit is contained in:
parent
e7ea5c1fdd
commit
15a8bc9f3e
@ -2082,7 +2082,7 @@ bool Gnuplot::get_program_path()
|
|||||||
// Retrieves a C string containing the value of environment variable PATH
|
// Retrieves a C string containing the value of environment variable PATH
|
||||||
path = std::getenv("PATH");
|
path = std::getenv("PATH");
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
if (!path)
|
if (path != nullptr)
|
||||||
{
|
{
|
||||||
s << path;
|
s << path;
|
||||||
}
|
}
|
||||||
@ -2091,10 +2091,8 @@ bool Gnuplot::get_program_path()
|
|||||||
throw GnuplotException("PATH is not well defined");
|
throw GnuplotException("PATH is not well defined");
|
||||||
}
|
}
|
||||||
std::string path_str;
|
std::string path_str;
|
||||||
if (s.gcount() > 0)
|
|
||||||
{
|
|
||||||
path_str = s.str();
|
path_str = s.str();
|
||||||
}
|
|
||||||
std::list<std::string> ls;
|
std::list<std::string> ls;
|
||||||
|
|
||||||
//split path (one long string) into list ls of strings
|
//split path (one long string) into list ls of strings
|
||||||
|
Loading…
Reference in New Issue
Block a user