diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-09 16:11:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-09 16:11:02 +0100 |
| commit | 17c46c84f24071cc7f50fb439967cffb3778e4de (patch) | |
| tree | d6de48dadc778487809cc557968886c15d9efa12 /src/asset_map.cc | |
| parent | 5bd1f0bf84b7ba1a59c8dc6c5c2fad5bf89b2c12 (diff) | |
Cope with paths having file:// at the start of them.
Diffstat (limited to 'src/asset_map.cc')
| -rw-r--r-- | src/asset_map.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/asset_map.cc b/src/asset_map.cc index 31809c9b..35f96c45 100644 --- a/src/asset_map.cc +++ b/src/asset_map.cc @@ -22,6 +22,7 @@ */ #include "asset_map.h" +#include "util.h" using namespace std; using namespace boost; @@ -50,6 +51,13 @@ Chunk::Chunk (xmlpp::Node const * node) : XMLNode (node) { path = string_node ("Path"); + + string const prefix = "file://"; + + if (starts_with (path, prefix)) { + path = path.substr (prefix.length()); + } + volume_index = optional_int64_node ("VolumeIndex"); offset = optional_int64_node ("Offset"); length = optional_int64_node ("Length"); |
