[Xfce4-commits] <postler:master> Exclude hidden folders from fetching

Christian Dywan noreply at xfce.org
Tue Dec 21 20:50:01 CET 2010


Updating branch refs/heads/master
         to ad213ee01dbba5ee8cb2981ba14da6a8513446b0 (commit)
       from 12f689c5f6819f2ef19cd6ce04e881271f08a093 (commit)

commit ad213ee01dbba5ee8cb2981ba14da6a8513446b0
Author: Bernd Prünster <bernd.pruenster at gmail.com>
Date:   Mon Dec 20 23:14:30 2010 +0100

    Exclude hidden folders from fetching
    
    Fixes: https://bugs.launchpad.net/postler/+bug/676615

 postler/postler-accounts.vala |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/postler/postler-accounts.vala b/postler/postler-accounts.vala
index 0c16ee8..b2a0303 100644
--- a/postler/postler-accounts.vala
+++ b/postler/postler-accounts.vala
@@ -419,6 +419,16 @@ public class Postler.Accounts : GLib.Object {
         if (certificate != null && !Path.is_absolute (certificate))
             certificate = info.path + "/" + certificate;
 
+        /* Exclude hidden folders from fetching */
+        string[] hidden_tmp = info.hide.split (",");
+        string hidden_folders = "";
+        foreach (string hidden in hidden_tmp) {
+            if (hidden.contains (" "))
+                hidden_folders += " \"!" + hidden.replace ("~-", "/") + "\"";
+            else
+                hidden_folders += " !" + hidden;
+        }
+
         if (send != null) {
             string msmtprc = """
                 defaults
@@ -473,6 +483,7 @@ public class Postler.Accounts : GLib.Object {
                    Master :remote:
                    Slave :local:
                    Patterns %% * !INBOX
+                   Patterns %% %s
 
                Group mirror
                    Channel local-remote:INBOX
@@ -487,7 +498,8 @@ public class Postler.Accounts : GLib.Object {
                    certificate != null ? "CertificateFile" : "",
                    certificate != null ? certificate : "",
                    info.path,
-                   info.path
+                   info.path,
+                   hidden_folders
                    );
             FileUtils.set_contents (filename, mbsyncrc, -1);
             FileUtils.chmod (filename, 0700);



More information about the Xfce4-commits mailing list