summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-18 22:17:54 +0100
committerCarl Hetherington <cth@carlh.net>2016-04-18 22:17:54 +0100
commitf0a6d7b5b8d16b8b47917cd30b340917f5c62fc5 (patch)
tree88d3cb102eb6780a4070c7642d6ec558afa8f310 /src
parent6f4466c962a81b205d43bb7519c8d927922f8401 (diff)
Replace hack with use of generic_string from boost::filesystem.
Diffstat (limited to 'src')
-rw-r--r--src/asset.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/asset.cc b/src/asset.cc
index 81321d4d..296e3bef 100644
--- a/src/asset.cc
+++ b/src/asset.cc
@@ -104,14 +104,7 @@ Asset::write_to_assetmap (xmlpp::Node* node, boost::filesystem::path root) const
xmlpp::Node* chunk_list = asset->add_child ("ChunkList");
xmlpp::Node* chunk = chunk_list->add_child ("Chunk");
- /* On Windows path.string() will contain back-slashes; replace these with
- forward-slashes. XXX: perhaps there is a nicer way to do this with boost.
- */
-
- string path_string = path.get().string ();
- boost::replace_all (path_string, "\\", "/");
-
- chunk->add_child("Path")->add_child_text (path_string);
+ chunk->add_child("Path")->add_child_text (path.get().generic_string());
chunk->add_child("VolumeIndex")->add_child_text ("1");
chunk->add_child("Offset")->add_child_text ("0");
chunk->add_child("Length")->add_child_text (raw_convert<string> (boost::filesystem::file_size (_file)));