aboutsummaryrefslogtreecommitdiff
path: root/src/support/type
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/type')
-rw-r--r--src/support/type/xobject_value.cc19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/support/type/xobject_value.cc b/src/support/type/xobject_value.cc
index 0236597..46ce53c 100644
--- a/src/support/type/xobject_value.cc
+++ b/src/support/type/xobject_value.cc
@@ -28,23 +28,14 @@ std::string XObjectValue::get<std::string>(
template <>
boost::filesystem::path XObjectValue::get<boost::filesystem::path>(
const xalan::XObjectPtr& ptr) const {
- const boost::filesystem::path rawPath(
- toString(ptr->str())
+ const std::string rawPath(
+ this->get<std::string>(ptr)
);
- const boost::filesystem::path filePath(
- this->filesystem_context_.resolve(rawPath)
- );
-
- if ( !(boost::filesystem::exists(filePath) &&
- boost::filesystem::is_regular_file(filePath)) ) {
- if ( auto resolvedPath = this->include_resolver_->resolve(rawPath) ) {
- return *resolvedPath;
- } else {
- return filePath;
- }
+ if ( auto resolvedPath = this->include_resolver_->resolve(rawPath) ) {
+ return *resolvedPath;
} else {
- return filePath;
+ return this->filesystem_context_.resolve(rawPath);
}
}