diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-10-17 13:33:55 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-10-17 13:33:55 +0200 |
commit | 50a50d736b5d5f1e9e2ef3c6afa6b4c0d3e50677 (patch) | |
tree | f227a996214cdaf4f6b099a7fe3dc7f09394fb5d /internal/imap/folder.go | |
parent | c369f615b0b53471a9f6d214e847bcaa1703ea5a (diff) | |
download | feed2imap-go-50a50d736b5d5f1e9e2ef3c6afa6b4c0d3e50677.tar.gz feed2imap-go-50a50d736b5d5f1e9e2ef3c6afa6b4c0d3e50677.tar.bz2 feed2imap-go-50a50d736b5d5f1e9e2ef3c6afa6b4c0d3e50677.zip |
#62: Root can be empty
Diffstat (limited to '')
-rw-r--r-- | internal/imap/folder.go | 10 |
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, } } |