1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

Interpret - as STDOUT on writing xml files

This prepares for the smartrack converter webservice.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2015-11-16 16:10:07 +01:00 committed by Dirk Hohndel
parent d3588ef0bb
commit 357f6376ec

View file

@ -666,12 +666,15 @@ int save_dives_logic(const char *filename, const bool select_only)
if (git)
return git_save_dives(git, branch, remote, select_only);
try_to_backup(filename);
save_dives_buffer(&buf, select_only);
error = -1;
f = subsurface_fopen(filename, "w");
if (same_string(filename, "-")) {
f = stdout;
} else {
try_to_backup(filename);
error = -1;
f = subsurface_fopen(filename, "w");
}
if (f) {
flush_buffer(&buf, f);
error = fclose(f);