D12019: make sure to create unique filename in maildir resource
Martin Koller
noreply at phabricator.kde.org
Tue Apr 10 20:32:37 BST 2018
mkoller added a comment.
In D12019#243886 <https://phabricator.kde.org/D12019#243886>, @knauss wrote:
> But the whole createUniqueFileName is not supposed to generate unique names anyways, as it is used in a do loop in Maildir::addEntry. I think be better approach to add to mutex, to garantee
> QFile::exists(key) || QFile::exists(finalKey) || QFile::exists(curKey) is valid. Maybe we should touch the file in tmp dir immediately. And than it is irrelevant if we use a not so good createUniqueFileName.
It IS supposed to and SHOULD create UNIQUE file names, since it does not matter that the mail file in ONE folder are unique when the file shall be moved into a different folder due to a filter rule afterwards.
This is exactly the problem I encounter. mails from the inbox shall be moved into some other folder but that fails since there is already the exact same file existing in the new target folder.
All this can be avoided when the files are unique in the first place, and unique all over all mail dirs
REPOSITORY
R44 KDE PIM Runtime
REVISION DETAIL
https://phabricator.kde.org/D12019
To: mkoller, mlaurent
Cc: knauss, winterz, dvratil, #kde_pim, dvasin, vkrause, mlaurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180410/7b0376cc/attachment.html>
More information about the kde-pim
mailing list