mirror of https://github.com/KLayout/klayout.git
Fixed a small flaw: pipe stream did not report source in errors
This commit is contained in:
parent
9a52095dd0
commit
012447c31b
|
|
@ -1334,11 +1334,11 @@ OutputPipe::write (const char *b, size_t n)
|
|||
// ---------------------------------------------------------------
|
||||
// InputPipe delegate implementation
|
||||
|
||||
InputPipe::InputPipe (const std::string &path)
|
||||
InputPipe::InputPipe (const std::string &source)
|
||||
: m_file (NULL)
|
||||
{
|
||||
m_source = path;
|
||||
m_file = popen (tl::string_to_system (path).c_str (), "r");
|
||||
m_source = source;
|
||||
m_file = popen (tl::string_to_system (source).c_str (), "r");
|
||||
if (m_file == NULL) {
|
||||
throw FilePOpenErrorException (m_source, errno);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ public:
|
|||
* @param cmd The command to execute
|
||||
* @param read True, if the file should be read, false on write.
|
||||
*/
|
||||
InputPipe (const std::string &path);
|
||||
InputPipe (const std::string &source);
|
||||
|
||||
/**
|
||||
* @brief Close the pipe
|
||||
|
|
@ -348,8 +348,7 @@ public:
|
|||
*/
|
||||
virtual std::string source () const
|
||||
{
|
||||
// No source (in the sense of a file name) is available ..
|
||||
return std::string ();
|
||||
return m_source;
|
||||
}
|
||||
|
||||
virtual std::string absolute_path () const
|
||||
|
|
|
|||
Loading…
Reference in New Issue