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:
parent
d3588ef0bb
commit
357f6376ec
1 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue