mirror of https://github.com/vitalif/openscad
Ignore empty filenames when calculating absolute path
parent
ee14c3f944
commit
021edd8aa7
|
@ -147,8 +147,16 @@ AbstractNode *Context::evaluate_module(const ModuleInstantiation *inst) const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the absolute path to the given filename, unless it's empty.
|
||||
*/
|
||||
QString Context::get_absolute_path(const QString &filename) const
|
||||
{
|
||||
if (!filename.isEmpty()) {
|
||||
return QFileInfo(QDir(this->document_path), filename).absoluteFilePath();
|
||||
}
|
||||
else {
|
||||
return filename;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue