-
Murray Cumming authored
* configure.ac: Depend on libarchive. * glom/libglom/document/document.[h|cc]: save_backup_file(): Use libarchive instead of the command-line. restore_backup_file(): Rename to extract backup_file() and redocument it to return the contents in memory rather than a path to a temporary file. Use libarchive rather than the command-line. * tests/test_selfhosting_utils.[h|cc]: Add test_create_and_selfhost_from_data(), moving some shared code into after_load(). * tests/test_selfhosting_new_then_backup_restore.cc: Adapted. The libarchive API is not well documented and the code is rather verbose and repetitive, mostly due to the error checking, so it does not feel entirely robust. But in general, this should be safer than using shell commands, even though we were doing that properly. And this would let us load the example data progressively/asynchronously if we make suitable changes to the API.
e6272d96