From 47bfba0d9152a1f7f689d7936b107b1a899a0b76 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 5 Feb 2016 17:33:08 +0100 Subject: Use property transformation for the mimeMessage The filepath changes with every flag change. It is thus easier to only store a limited path that remains stable, and figure out the rest as the property is requested (we'll have to translate it anyways once we the file handoff protocol is implemented). The reason why we don't update the mimeMessage path on every modification is because we move the message during change replay, and not while storing the modification in the db. This would lead to the message-path on disk not correspond to what is in the db for some time. --- examples/maildirresource/libmaildir/maildir.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'examples/maildirresource/libmaildir/maildir.h') diff --git a/examples/maildirresource/libmaildir/maildir.h b/examples/maildirresource/libmaildir/maildir.h index 5936515..6c68656 100644 --- a/examples/maildirresource/libmaildir/maildir.h +++ b/examples/maildirresource/libmaildir/maildir.h @@ -262,6 +262,19 @@ public: querying the last error string. */ QString lastError() const; + /** + * Returns the key from the file identified by the full path @param file. + */ + static QString getKeyFromFile( const QString& file ); + + /** + * Returns the directory from a file. + * + * Strips key and new/cur/tmp. + * The returned path is ended with a trailing slash. + */ + static QString getDirectoryFromFile( const QString& file ); + private: void swap( const Maildir& ); class Private; -- cgit v1.2.3