diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2014-06-08 07:35:20 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-15 09:17:45 -0700 |
commit | 4a69dea972775e666e2309cab0a04d948f54d7b4 (patch) | |
tree | c393c155710126680803312cf4886a2b714883f3 /worldmap-save.c | |
parent | d209d35f64c901fe7c0665b3f735c072682761de (diff) | |
download | subsurface-4a69dea972775e666e2309cab0a04d948f54d7b4.tar.gz |
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 <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'worldmap-save.c')
-rw-r--r-- | worldmap-save.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |