summaryrefslogtreecommitdiff
path: root/src/interop_subtitle_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-05-27 14:21:35 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-27 14:25:17 +0200
commita6a1294944d4ce02cbb429ca1aec07ca78d79a88 (patch)
tree0122b12b7488a7471a0764a3f1e857c0cc3584b8 /src/interop_subtitle_asset.cc
parent8c27355abdac31c38c2fd5f41e36097dd5360422 (diff)
Tidy handling of _raw_xml.
Before this if we tried to get the XML of an encrypted asset we would just get an empty string. Now we get a boost::none which means the verifier can avoid trying to check details of the XML (and instead raise a warning that you are trying to verify data that it cannot decrypt).
Diffstat (limited to 'src/interop_subtitle_asset.cc')
-rw-r--r--src/interop_subtitle_asset.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc
index 453cad8b..a7be5d1a 100644
--- a/src/interop_subtitle_asset.cc
+++ b/src/interop_subtitle_asset.cc
@@ -199,9 +199,9 @@ InteropSubtitleAsset::write (boost::filesystem::path p) const
throw FileError ("Could not open file for writing", p, -1);
}
- auto const s = xml_as_string ();
+ _raw_xml = xml_as_string ();
/* length() here gives bytes not characters */
- fwrite (s.c_str(), 1, s.length(), f);
+ fwrite (_raw_xml->c_str(), 1, _raw_xml->length(), f);
fclose (f);
_file = p;