<table><tr><td style="">mkoller created this revision.<br />mkoller added a reviewer: mlaurent.<br />Restricted Application added a project: KDE PIM.<br />Restricted Application added a subscriber: KDE PIM.<br />mkoller requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D12019">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>While having akonadiconsole open by chance, I saw a few error messages like:</p>

<p>AgentBase(akonadi_maildir_resource_0): Could not move message '1521037293.<a href="https://phabricator.kde.org/source/smokegen/" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">R521</a>.lapi.koller' from '/home/koller/Mail/inbox' to '/home/koller/Mail/.z_div. privat.directory/KDE-FW-Devel'. The error was Destination file exists.</p>

<p>and in fact this is correct - I really have some mail filenames with the same name.<br />
I assume that this can happen when during maildownload (POP3) and filtering a mail from the inbox is moved to the filter target folder<br />
and within the same second a new mailfile shall be created. In my case both files come from the same mailinglist.<br />
(why also the random part is then the same seems just to be bad luck).</p>

<p>This patch changes the "current-time + random" way to use QUuid - which from the source seems it was the original idea but due to a Qt bug in an old Qt version, it was not used<br />
<a href="https://bugreports.qt.io/browse/QTBUG-8374" class="remarkup-link" target="_blank" rel="noreferrer">https://bugreports.qt.io/browse/QTBUG-8374</a></p>

<p>Since this bug is solved since Qt 4.7, I feel this patch is a much safer approach to generate a unique file name.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R44 KDE PIM Runtime</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12019">https://phabricator.kde.org/D12019</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>maildir.cpp</div></div></div><br /><div><strong>To: </strong>mkoller, mlaurent<br /><strong>Cc: </strong>KDE PIM, dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>