aboutsummaryrefslogtreecommitdiff
path: root/src/function/read_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/function/read_file.cc')
-rw-r--r--src/function/read_file.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/function/read_file.cc b/src/function/read_file.cc
index 85f834d..1a870a6 100644
--- a/src/function/read_file.cc
+++ b/src/function/read_file.cc
@@ -28,18 +28,13 @@ xercesc::DOMDocument* FunctionReadFile::constructDocument(
const FilesystemContext& fsContext,
const FunctionBase::parameter_tuple& parameters
) {
- boost::filesystem::path filePath(
- fsContext.resolve(std::get<0>(parameters))
- );
+ const std::string& rawPath = std::get<0>(parameters);
+ boost::filesystem::path filePath(fsContext.resolve(rawPath));
if ( !(boost::filesystem::exists(filePath) &&
boost::filesystem::is_regular_file(filePath)) ) {
- auto resolvedPath = this->include_resolver_->resolve(
- std::get<0>(parameters)
- );
-
- if ( resolvedPath.first ) {
- filePath = resolvedPath.second;
+ if ( auto resolvedPath = this->include_resolver_->resolve(rawPath) ) {
+ filePath = *resolvedPath;
}
}