From 4a69dea972775e666e2309cab0a04d948f54d7b4 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Sun, 8 Jun 2014 07:35:20 +0300 Subject: HTML: Report saving to file errors. Use subsurface report_error function in save-html and worldmap-save instead of the ridiculous print to standard output. Also use subsurface_fopen for the sake of different platforms. Signed-off-by: Gehad elrobey Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- worldmap-save.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'worldmap-save.c') diff --git a/worldmap-save.c b/worldmap-save.c index 0dbc4791f..35a68966f 100644 --- a/worldmap-save.c +++ b/worldmap-save.c @@ -90,9 +90,9 @@ void export_worldmap_HTML(const char *file_name, const bool selected_only) struct membuffer buf = { 0 }; export(&buf, selected_only); - f = fopen(file_name, "w+"); + f = subsurface_fopen(file_name, "w+"); if (!f) - printf("error"); /*report error*/ + report_error(translate("gettextFromC", "Can't open file %s"), file_name); flush_buffer(&buf, f); /*check for writing errors? */ free_buffer(&buf); -- cgit v1.2.3-70-g09d2