summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-15 02:08:02 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-15 02:08:02 +0200
commit8ff71b5ae506306d7981eb118874cd4f407b2bf8 (patch)
treef0e522f2bf3036df8cb6c5c6ce87de547607bfba
parentd320e750877a6cf8d5993da6d2cd121fe5b4d78e (diff)
Added Frontend "+/" filename syntax for files from proc_share_dir
-rw-r--r--kernel/register.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/register.cc b/kernel/register.cc
index 868dbb94..a9e21e6d 100644
--- a/kernel/register.cc
+++ b/kernel/register.cc
@@ -339,8 +339,11 @@ void Frontend::extra_args(FILE *&f, std::string &filename, std::vector<std::stri
last_here_document += buffer;
}
f = fmemopen((void*)last_here_document.c_str(), last_here_document.size(), "r");
- } else
+ } else {
+ if (filename.substr(0, 2) == "+/")
+ filename = proc_share_dirname() + filename.substr(1);
f = fopen(filename.c_str(), "r");
+ }
if (f == NULL)
log_cmd_error("Can't open input file `%s' for reading: %s\n", filename.c_str(), strerror(errno));