summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interop_subtitle_asset.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc
index 39521ed7..6c9c6b42 100644
--- a/src/interop_subtitle_asset.cc
+++ b/src/interop_subtitle_asset.cc
@@ -198,19 +198,14 @@ InteropSubtitleAsset::write (boost::filesystem::path p) const
/* Fonts */
BOOST_FOREACH (shared_ptr<InteropLoadFontNode> i, _load_font_nodes) {
boost::filesystem::path file = p.parent_path() / i->uri;
- FILE* f = fopen_boost (file, "wb");
- if (!f) {
- throw FileError ("could not open font file for writing", file, errno);
- }
list<Font>::const_iterator j = _fonts.begin ();
while (j != _fonts.end() && j->load_id != i->id) {
++j;
}
if (j != _fonts.end ()) {
- fwrite (j->data.data().get(), 1, j->data.size(), f);
+ j->data.write (file);
j->file = file;
}
- fclose (f);
}
}