After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789555 - "Synchronize for offline" works on opened folders only
"Synchronize for offline" works on opened folders only
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.26.x (obsolete)
Other Linux
: Normal major
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2017-10-27 12:40 UTC by André Klapper
Modified: 2018-02-20 10:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed eds patch (9.19 KB, patch)
2017-10-30 17:44 UTC, Milan Crha
committed Details | Review

Description André Klapper 2017-10-27 12:40:38 UTC
Split from bug 789529:

=== Steps:

1. I have one GMail IMAP subfolder set to "Copy folder content locally for
   offline operation". 
2. I click the connector logo in the lower left corner
3. I get a dialog "Synchronize folders locally for offline usage?"
4. I click "Synchronize" and wait. 
5. Once Evolution has finished, I go to that subfolder.

=== Expected outcome:

* All messages are available for offline usage.

=== Actual outcome:

Some messages display "Unable to retrieve message. Empty cache file" errors.
Comment 1 Milan Crha 2017-10-30 16:14:43 UTC
Thanks for a bug report. A test build with (partly) related change is here [1]. It should fix auto-download for offline when the message is received for the first time (some odd thread interleaving could cause new messages look like being changed instead).

The problem with the 4) above is that it doesn't try with each existing folder (which can be wrong anyway), but only with currently opened folders. That all is fine as long as either Junk or Trash folders are virtual folders (those virtual folders 'keep alive' folders once they are opened).

That means, if you repeat the steps when the folder you've setup for offline use is selected will also download all locally missing messages in that folder. When that folder is not selected (which the 5) suggests), then it will or will not work according to the real Trash/Junk setting for the account. The behaviour of the "Synchronize" for offline is nothing new, it always worked on opened folders only, but the use of real trash/junk is particularly new.

I believe this is the change in account settings for 3.26.x, the auto-config code set both folders to their server-side counterparts, which wasn't the case before the update.

I'll try to find some way to not depend on currently opened folders when doing synchronization for offline.

[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=22809584
Comment 2 Milan Crha 2017-10-30 17:44:46 UTC
Created attachment 362571 [details] [review]
proposed eds patch

for evolution-data-server;

This patch includes the change from the previous test build plus a change to synchronize also closed folders when they are set to be synchronized for offline. 

I made another test build for you with it included, thus, please, give it a try. You should see that the above steps will take significantly longer to finish, regardless which folder you'll stay in.
https://koji.fedoraproject.org/koji/taskinfo?taskID=22811406
Comment 3 Milan Crha 2017-10-31 10:47:23 UTC
Let's use this bug report for the '"Synchronize for offline" works on opened folders only', which you said (on IRC) helped a bit, but not necessarily with the 'Empty cache file' error. I do not know what that subpart can be about yet. In any case, I'm committing the above patch and I'll close this bug report.

Created commit 2c30b3175 in eds master (3.27.2+)
Created commit db37b333d in eds gnome-3-26 (3.26.2.1+)
Comment 4 Milan Crha 2018-02-20 10:21:27 UTC
There had been more to be done, see bug #793476