summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/context.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/context.cc b/src/context.cc
index 5aec712b..4bc6ed5 100644
--- a/src/context.cc
+++ b/src/context.cc
@@ -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
{
- return QFileInfo(QDir(this->document_path), filename).absoluteFilePath();
+ if (!filename.isEmpty()) {
+ return QFileInfo(QDir(this->document_path), filename).absoluteFilePath();
+ }
+ else {
+ return filename;
+ }
}
contact: Jan Huwald // Impressum