aboutsummaryrefslogtreecommitdiff
path: root/internal/imap/folder.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/imap/folder.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/imap/folder.go b/internal/imap/folder.go
index 6353bb3..d7562b8 100644
--- a/internal/imap/folder.go
+++ b/internal/imap/folder.go
@@ -15,8 +15,16 @@ func (f Folder) Append(other Folder) Folder {
if f.delimiter != other.delimiter {
panic("Delimiters do not match")
}
+
+ var prefix string
+ if f.str == "" {
+ prefix = ""
+ } else {
+ prefix = f.str + f.delimiter
+ }
+
return Folder{
- str: f.str + f.delimiter + other.str,
+ str: prefix + other.str,
delimiter: f.delimiter,
}
}