[Xfce4-commits] <postler:master> Create proper subfolders for missing folder
Christian Dywan
noreply at xfce.org
Mon Dec 20 18:10:01 CET 2010
Updating branch refs/heads/master
to 1719ebc981296bd8eb3db0ac347ec70047f14491 (commit)
from 94c54b2b6ccadff8a88c8eb79500cfe79695f7b6 (commit)
commit 1719ebc981296bd8eb3db0ac347ec70047f14491
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Dec 20 18:05:13 2010 +0100
Create proper subfolders for missing folder
postler/postler-folders.vala | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index 0e1c0cc..9e894e0 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -233,8 +233,10 @@ public class Postler.Folders : Gtk.TreeView {
folder_iter = new Gtk.TreeIter ();
if (folder.role != null
&& get_folder_iter (account_info.path + "/" + folder.role,
- account_iter, out folder_iter))
+ account_iter, out folder_iter)) {
store.remove (folder_iter);
+ need_update = true;
+ }
store.insert_with_values (out folder_iter,
folder.localized != null ? account_iter : parent_iter, -1,
@@ -265,8 +267,12 @@ public class Postler.Folders : Gtk.TreeView {
Columns.ICON, folder.stock_id ?? Gtk.STOCK_DIRECTORY,
Columns.NAME, folder.label);
need_update = true;
- } else
- DirUtils.create (account_info.path + "/" + folder.role, 0700);
+ } else {
+ string missing = account_info.path + "/" + folder.role;
+ DirUtils.create_with_parents (missing + "/new", 0700);
+ DirUtils.create (missing + "/cur", 0700);
+ DirUtils.create (missing + "/tmp", 0700);
+ }
});
expand_row (store.get_path (account_iter), false);
More information about the Xfce4-commits
mailing list