1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-16 10:09:58 +00:00

Fix if PATH is not set

This commit is contained in:
Carles Fernandez 2019-03-03 11:56:57 +01:00
parent 5635d6a012
commit 2cf1d72640
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -2086,12 +2086,15 @@ bool Gnuplot::get_program_path()
{
s << path;
}
if (s.fail() or s.gcount() == 0)
if (s.fail())
{
throw GnuplotException("PATH is not set");
throw GnuplotException("PATH is not well defined");
}
std::string path_str;
if (s.gcount() > 0)
{
path_str = s.str();
}
std::string path_str = s.str();
std::list<std::string> ls;
//split path (one long string) into list ls of strings