summary refs log tree commit diff stats
path: root/lib/msgstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r--lib/msgstore.go17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 6ab7fc2..900ec16 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -218,20 +218,27 @@ func (store *MessageStore) Delete(uids []uint32,
 	store.update()
 }
 
-func (store *MessageStore) Copy(uids []uint32, dest string,
+func (store *MessageStore) Copy(uids []uint32, dest string, createDest bool,
 	cb func(msg types.WorkerMessage)) {
+
 	var set imap.SeqSet
 	for _, uid := range uids {
 		set.AddNum(uid)
 	}
 
+	if createDest {
+		store.worker.PostAction(&types.CreateDirectory{
+			Directory: dest,
+		}, cb)
+	}
+
 	store.worker.PostAction(&types.CopyMessages{
 		Destination: dest,
 		Uids:        set,
 	}, cb)
 }
 
-func (store *MessageStore) Move(uids []uint32, dest string,
+func (store *MessageStore) Move(uids []uint32, dest string, createDest bool,
 	cb func(msg types.WorkerMessage)) {
 
 	var set imap.SeqSet
@@ -240,6 +247,12 @@ func (store *MessageStore) Move(uids []uint32, dest string,
 		store.Deleted[uid] = nil
 	}
 
+	if createDest {
+		store.worker.PostAction(&types.CreateDirectory{
+			Directory: dest,
+		}, cb)
+	}
+
 	store.worker.PostAction(&types.CopyMessages{
 		Destination: dest,
 		Uids:        set,
;)' href='/acidbong/suckless/dwm/commit/config.arg.h?h=5.7.2&id=58beead14d79ba42acc6357d450c4125e3e8407a'>58beead ^
d2dd58e ^
a73a882 ^
f196b71 ^
3794c62 ^

f196b71 ^







3794c62 ^
f196b71 ^
3794c62 ^





352cae4 ^
f196b71 ^
352cae4 ^
3794c62 ^
f196b71 ^

b38905b ^
a73a882 ^
3059c9c ^
352cae4 ^


















19dcbc5 ^
b60406c ^
9e4e4d9 ^

352cae4 ^


42fd392 ^
19dcbc5 ^



11a08b9 ^
e1811c3 ^



19dcbc5 ^
352cae4 ^
19dcbc5 ^



11a08b9 ^
e1811c3 ^



352cae4 ^








a73a882 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100