summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/asset.cc6
-rw-r--r--src/util.cc3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/asset.cc b/src/asset.cc
index 6e200b0d..eb6f4a07 100644
--- a/src/asset.cc
+++ b/src/asset.cc
@@ -85,11 +85,7 @@ Asset::add_to_pkl (shared_ptr<PKL> pkl, path root) const
{
DCP_ASSERT (_file);
- auto path = relative_to_root (
- canonical(root),
- canonical(_file.get())
- );
-
+ auto path = relative_to_root (root, _file.get());
if (!path) {
/* The path of this asset is not within our DCP, so we assume it's an external
(referenced) one.
diff --git a/src/util.cc b/src/util.cc
index 6ae69387..d7cbda8b 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -232,6 +232,9 @@ dcp::base64_decode (string const & in, unsigned char* out, int out_length)
optional<boost::filesystem::path>
dcp::relative_to_root (boost::filesystem::path root, boost::filesystem::path file)
{
+ root = boost::filesystem::canonical(root);
+ file = boost::filesystem::canonical(file);
+
auto i = root.begin ();
auto j = file.begin ();