diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-16 10:31:51 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-16 10:39:59 +0100 |
commit | de46e35b8f59742dcbb37d08e3c291ff9cadac10 (patch) | |
tree | 894dfc2387e513155c28c8101b24df239db8ad40 /examples | |
parent | 9638d864a992bcbdb30b0baf5274072cef4125a5 (diff) | |
download | sink-de46e35b8f59742dcbb37d08e3c291ff9cadac10.tar.gz sink-de46e35b8f59742dcbb37d08e3c291ff9cadac10.zip |
Find mime message even if it has been renamed due to a flag change
Diffstat (limited to 'examples')
-rw-r--r-- | examples/maildirresource/libmaildir/maildir.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/maildirresource/libmaildir/maildir.cpp b/examples/maildirresource/libmaildir/maildir.cpp index 079bb10..f7585fe 100644 --- a/examples/maildirresource/libmaildir/maildir.cpp +++ b/examples/maildirresource/libmaildir/maildir.cpp | |||
@@ -120,6 +120,21 @@ public: | |||
120 | if (QFile::exists(path + QString::fromLatin1("/new/") + key)) { | 120 | if (QFile::exists(path + QString::fromLatin1("/new/") + key)) { |
121 | return path + QString::fromLatin1("/new/") + key; | 121 | return path + QString::fromLatin1("/new/") + key; |
122 | } | 122 | } |
123 | { | ||
124 | QDir dir(path + QString::fromLatin1("/cur/")); | ||
125 | const QFileInfoList list = dir.entryInfoList(QStringList() << (key+"*"), QDir::Files); | ||
126 | if (!list.isEmpty()) { | ||
127 | return list.first().filePath(); | ||
128 | } | ||
129 | } | ||
130 | |||
131 | { | ||
132 | QDir dir(path + QString::fromLatin1("/new/")); | ||
133 | const QFileInfoList list = dir.entryInfoList(QStringList() << (key+"*"), QDir::Files); | ||
134 | if (!list.isEmpty()) { | ||
135 | return list.first().filePath(); | ||
136 | } | ||
137 | } | ||
123 | 138 | ||
124 | return QString(); | 139 | return QString(); |
125 | } | 140 | } |