Introduce document_t::detach_backup

This will reset the document’s backup path but not delete the backup on disk (which can be found via the document’s identifier).

This is useful if we wish to dispose the document but reconstruct it later (e.g. during application termination).
This commit is contained in:
Allan Odgaard
2013-01-16 04:17:23 +01:00
parent 3835b55a55
commit 8611aa3f11

View File

@@ -212,6 +212,7 @@ namespace document
void try_save (document::save_callback_ptr callback);
bool save ();
bool backup ();
void detach_backup () { _backup_path = NULL_STR; }
void set_path (std::string const& newPath);
void set_virtual_path (std::string const& virtualPath) { _virtual_path = virtualPath; }