Oops. I forgot to 'fclose()' the file after saving the xml

It never actually triggered anything for me, but any buffered data might
be lost, especially if you force-exit the application after saving a
dive log.

This probably explains a corrupted (truncated) dive file report from
Nathan Samson.

Reported-by: Nathan Samson <https://github.com/nathansamson>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2011-09-04 09:50:31 -07:00
parent a6b9eaee0a
commit a57668127e

View file

@ -193,4 +193,5 @@ void save_dives(const char *filename)
for (i = 0; i < dive_table.nr; i++)
save_dive(f, get_dive(i));
fprintf(f, "</dives>\n");
fclose(f);
}